Exception: Mailgems::ApiError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/mailgems/api_error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code, message) ⇒ ApiError

Returns a new instance of ApiError.



7
8
9
10
# File 'lib/mailgems/api_error.rb', line 7

def initialize(code, message)
  @code = code
  @message = message
end

Instance Attribute Details

#codeObject

Returns the value of attribute code.



5
6
7
# File 'lib/mailgems/api_error.rb', line 5

def code
  @code
end

#messageObject

Returns the value of attribute message.



5
6
7
# File 'lib/mailgems/api_error.rb', line 5

def message
  @message
end

Instance Method Details

#to_sObject



12
13
14
# File 'lib/mailgems/api_error.rb', line 12

def to_s
  reason
end