Exception: IpToEarth::APIException

Inherits:
StandardError
  • Object
show all
Defined in:
lib/ip_to_earth/api_exception.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(reason, response_code, response_body) ⇒ APIException

Returns a new instance of APIException.



5
6
7
8
9
# File 'lib/ip_to_earth/api_exception.rb', line 5

def initialize(reason, response_code, response_body)
  super(reason)
  @response_code = response_code
  @response_body = response_body
end

Instance Attribute Details

#response_bodyObject (readonly)

Returns the value of attribute response_body.



3
4
5
# File 'lib/ip_to_earth/api_exception.rb', line 3

def response_body
  @response_body
end

#response_codeObject (readonly)

Returns the value of attribute response_code.



3
4
5
# File 'lib/ip_to_earth/api_exception.rb', line 3

def response_code
  @response_code
end