Exception: Eleyo::API::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Eleyo::API::Error
- Defined in:
- lib/eleyo/api.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#http_status_code ⇒ Object
Returns the value of attribute http_status_code.
Instance Method Summary collapse
-
#initialize(code, message) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(code, message) ⇒ Error
Returns a new instance of Error.
22 23 24 25 26 27 28 29 30 |
# File 'lib/eleyo/api.rb', line 22 def initialize(code, ) self.http_status_code = code.to_i begin self.json = JSON.parse() rescue end super "(#{code}) #{message}" end |
Instance Attribute Details
#http_status_code ⇒ Object
Returns the value of attribute http_status_code.
21 22 23 |
# File 'lib/eleyo/api.rb', line 21 def http_status_code @http_status_code end |