Exception: Fortnox::RequestError
- Defined in:
- lib/fortnox.rb
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(arg = nil) ⇒ RequestError
constructor
A new instance of RequestError.
Constructor Details
#initialize(arg = nil) ⇒ RequestError
Returns a new instance of RequestError.
23 24 25 26 27 28 29 30 |
# File 'lib/fortnox.rb', line 23 def initialize(arg = nil) if arg.respond_to?(:status) @response = arg super("Request failed: #{arg.status}") else super end end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
21 22 23 |
# File 'lib/fortnox.rb', line 21 def response @response end |