Exception: Geoloqi::ApiError
- Inherits:
-
StandardError
- Object
- StandardError
- Geoloqi::ApiError
- Defined in:
- lib/geoloqi/error.rb
Instance Attribute Summary collapse
-
#reason ⇒ Object
readonly
Returns the value of attribute reason.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(status, type, reason = nil) ⇒ ApiError
constructor
A new instance of ApiError.
Constructor Details
#initialize(status, type, reason = nil) ⇒ ApiError
Returns a new instance of ApiError.
4 5 6 7 8 9 10 11 12 |
# File 'lib/geoloqi/error.rb', line 4 def initialize(status, type, reason=nil) @status = status @type = type @reason = reason = type += " - #{reason}" if reason += " (#{status})" super end |
Instance Attribute Details
#reason ⇒ Object (readonly)
Returns the value of attribute reason.
3 4 5 |
# File 'lib/geoloqi/error.rb', line 3 def reason @reason end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
3 4 5 |
# File 'lib/geoloqi/error.rb', line 3 def status @status end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
3 4 5 |
# File 'lib/geoloqi/error.rb', line 3 def type @type end |