Exception: Sesame2::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Sesame2::Error
- Defined in:
- lib/sesame2/error.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(status, data) ⇒ Error
constructor
A new instance of Error.
- #to_s ⇒ Object
Constructor Details
#initialize(status, data) ⇒ Error
Returns a new instance of Error.
7 8 9 10 11 |
# File 'lib/sesame2/error.rb', line 7 def initialize(status, data) super(data["error"]) @data = data @status = status end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
5 6 7 |
# File 'lib/sesame2/error.rb', line 5 def code @code end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
5 6 7 |
# File 'lib/sesame2/error.rb', line 5 def status @status end |
Instance Method Details
#to_s ⇒ Object
13 14 15 |
# File 'lib/sesame2/error.rb', line 13 def to_s %(#{@data["error"]} HTTP: #{status}) end |