Exception: RubyBox::RubyBoxError
- Inherits:
-
StandardError
- Object
- StandardError
- RubyBox::RubyBoxError
- Defined in:
- lib/ruby-box/exceptions.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#status ⇒ Object
Returns the value of attribute status.
Instance Method Summary collapse
- #[](key) ⇒ Object
-
#initialize(error_json, status, body) ⇒ RubyBoxError
constructor
A new instance of RubyBoxError.
Constructor Details
#initialize(error_json, status, body) ⇒ RubyBoxError
Returns a new instance of RubyBoxError.
5 6 7 8 9 |
# File 'lib/ruby-box/exceptions.rb', line 5 def initialize(error_json, status, body) @status = status @body = body @error_json = error_json end |
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
3 4 5 |
# File 'lib/ruby-box/exceptions.rb', line 3 def body @body end |
#status ⇒ Object
Returns the value of attribute status.
3 4 5 |
# File 'lib/ruby-box/exceptions.rb', line 3 def status @status end |
Instance Method Details
#[](key) ⇒ Object
11 12 13 |
# File 'lib/ruby-box/exceptions.rb', line 11 def [](key) @error_json[key] end |