Exception: AstroInsight::Error

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, status_code = nil, response_body = nil) ⇒ Error

Returns a new instance of Error.



7
8
9
10
11
# File 'lib/astroinsight/error.rb', line 7

def initialize(message, status_code = nil, response_body = nil)
  @status_code = status_code
  @response_body = response_body
  super(message)
end

Instance Attribute Details

#response_bodyObject (readonly)

Returns the value of attribute response_body.



5
6
7
# File 'lib/astroinsight/error.rb', line 5

def response_body
  @response_body
end

#status_codeObject (readonly)

Returns the value of attribute status_code.



5
6
7
# File 'lib/astroinsight/error.rb', line 5

def status_code
  @status_code
end