Exception: NinjaVan::RequestError
- Defined in:
- lib/ninja_van/error.rb
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
- #error ⇒ Object
-
#initialize(response) ⇒ RequestError
constructor
A new instance of RequestError.
Constructor Details
#initialize(response) ⇒ RequestError
Returns a new instance of RequestError.
13 14 15 16 |
# File 'lib/ninja_van/error.rb', line 13 def initialize(response) super @response = response end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
5 6 7 |
# File 'lib/ninja_van/error.rb', line 5 def response @response end |
Instance Method Details
#error ⇒ Object
18 19 20 |
# File 'lib/ninja_van/error.rb', line 18 def error @error ||= OpenStruct.new(response['error']) end |