Exception: NasaApi::Error
- Inherits:
-
StandardError
- Object
- StandardError
- NasaApi::Error
- Defined in:
- lib/nasa_api.rb
Instance Attribute Summary collapse
-
#http_code ⇒ Object
readonly
Returns the value of attribute http_code.
-
#http_msg ⇒ Object
readonly
Returns the value of attribute http_msg.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Instance Method Summary collapse
-
#initialize(response) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(response) ⇒ Error
Returns a new instance of Error.
10 11 12 13 14 |
# File 'lib/nasa_api.rb', line 10 def initialize(response) @http_code = response.code @http_msg = response. = response['error']['message'] if response['error'] end |
Instance Attribute Details
#http_code ⇒ Object (readonly)
Returns the value of attribute http_code.
8 9 10 |
# File 'lib/nasa_api.rb', line 8 def http_code @http_code end |
#http_msg ⇒ Object (readonly)
Returns the value of attribute http_msg.
8 9 10 |
# File 'lib/nasa_api.rb', line 8 def http_msg @http_msg end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
8 9 10 |
# File 'lib/nasa_api.rb', line 8 def end |