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