Class: LunchMoney::Errors
- Inherits:
-
Object
- Object
- LunchMoney::Errors
- Defined in:
- lib/lunchmoney/errors.rb
Overview
This class is used to represent errors returned directly from the LunchMoney API. This class has been set up to act like an array, delegating a lot of common array getter methods directly to messages for you.
Instance Attribute Summary collapse
Instance Method Summary collapse
- #initialize(message: nil) ⇒ void constructor
Constructor Details
#initialize(message: nil) ⇒ void
27 28 29 30 31 |
# File 'lib/lunchmoney/errors.rb', line 27 def initialize(message: nil) @messages = T.let([], T::Array[String]) @messages << unless .nil? end |
Instance Attribute Details
#messages ⇒ Array<String>
24 25 26 |
# File 'lib/lunchmoney/errors.rb', line 24 def @messages end |