Class: LunchMoney::Errors

Inherits:
Object
  • Object
show all
Defined in:
lib/lunchmoney/errors.rb

Overview

This class is used to represent errors returned directly from the LunchMoney API

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message: nil) ⇒ Errors

Returns a new instance of Errors.



11
12
13
14
15
# File 'lib/lunchmoney/errors.rb', line 11

def initialize(message: nil)
  @messages = T.let([], T::Array[String])

  @messages << message unless message.nil?
end

Instance Attribute Details

#messagesObject

Returns the value of attribute messages.



8
9
10
# File 'lib/lunchmoney/errors.rb', line 8

def messages
  @messages
end