Exception: Nexpose::APIError
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- Nexpose::APIError
- Defined in:
- lib/nexpose/error.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#reason ⇒ Object
Returns the value of attribute reason.
-
#req ⇒ Object
Returns the value of attribute req.
Instance Method Summary collapse
-
#initialize(req, reason = '', code = 400) ⇒ APIError
constructor
A new instance of APIError.
- #to_s ⇒ Object
Constructor Details
#initialize(req, reason = '', code = 400) ⇒ APIError
Returns a new instance of APIError.
7 8 9 10 11 |
# File 'lib/nexpose/error.rb', line 7 def initialize(req, reason = '', code = 400) @req = req @reason = reason @code = code end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
5 6 7 |
# File 'lib/nexpose/error.rb', line 5 def code @code end |
#reason ⇒ Object
Returns the value of attribute reason.
4 5 6 |
# File 'lib/nexpose/error.rb', line 4 def reason @reason end |
#req ⇒ Object
Returns the value of attribute req.
4 5 6 |
# File 'lib/nexpose/error.rb', line 4 def req @req end |
Instance Method Details
#to_s ⇒ Object
13 14 15 |
# File 'lib/nexpose/error.rb', line 13 def to_s "NexposeAPI: #{@reason}" end |