Exception: MailinatorClient::ResponseError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/mailinator_client/error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code, result) ⇒ ResponseError

Returns a new instance of ResponseError.



28
29
30
31
32
# File 'lib/mailinator_client/error.rb', line 28

def initialize(code, result)
  @code = code
  @type = result["type"]
  super(result["message"])
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



25
26
27
# File 'lib/mailinator_client/error.rb', line 25

def code
  @code
end

#typeObject (readonly)

Returns the value of attribute type.



26
27
28
# File 'lib/mailinator_client/error.rb', line 26

def type
  @type
end