Class: NasaApod::Error
- Inherits:
-
Object
- Object
- NasaApod::Error
- Defined in:
- lib/nasa_apod/error.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#code_definition ⇒ Object
readonly
Returns the value of attribute code_definition.
-
#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.
6 7 8 9 10 |
# File 'lib/nasa_apod/error.rb', line 6 def initialize(response) @code = response.code @code_definition = response. = response["error"]["message"] if response["error"] end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
4 5 6 |
# File 'lib/nasa_apod/error.rb', line 4 def code @code end |
#code_definition ⇒ Object (readonly)
Returns the value of attribute code_definition.
4 5 6 |
# File 'lib/nasa_apod/error.rb', line 4 def code_definition @code_definition end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
4 5 6 |
# File 'lib/nasa_apod/error.rb', line 4 def end |