Exception: Xhash::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Xhash::Error
- Defined in:
- lib/xhash/error.rb
Direct Known Subclasses
InvalidFieldError, MalformedResponse, MissingRequiredFieldError
Instance Attribute Summary collapse
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(options = {}) ⇒ Error
Returns a new instance of Error.
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/xhash/error.rb', line 5 def initialize( = {}) if .is_a? Hash @message = [:message] @response = [:response] else @message = "Server error" @response = end super end |
Instance Attribute Details
#message ⇒ Object (readonly)
Returns the value of attribute message.
3 4 5 |
# File 'lib/xhash/error.rb', line 3 def @message end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
3 4 5 |
# File 'lib/xhash/error.rb', line 3 def response @response end |