Exception: PandaDoc::FailureResult
- Inherits:
-
StandardError
- Object
- StandardError
- PandaDoc::FailureResult
- Extended by:
- Forwardable
- Defined in:
- lib/panda_doc/failure_result.rb
Instance Attribute Summary collapse
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(response) ⇒ FailureResult
constructor
A new instance of FailureResult.
- #to_s ⇒ Object
Constructor Details
#initialize(response) ⇒ FailureResult
Returns a new instance of FailureResult.
13 14 15 16 |
# File 'lib/panda_doc/failure_result.rb', line 13 def initialize(response) @response = response @error = Objects::Error.new(response.body) end |
Instance Attribute Details
#error ⇒ Object (readonly)
Returns the value of attribute error.
9 10 11 |
# File 'lib/panda_doc/failure_result.rb', line 9 def error @error end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
11 12 13 |
# File 'lib/panda_doc/failure_result.rb', line 11 def response @response end |
Instance Method Details
#to_s ⇒ Object
18 19 20 |
# File 'lib/panda_doc/failure_result.rb', line 18 def to_s "#{status} #{type}: #{detail}" end |