Exception: Fraggle::Connection::ResponseError
- Inherits:
-
StandardError
- Object
- StandardError
- Fraggle::Connection::ResponseError
- Defined in:
- lib/fraggle/connection.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
Instance Method Summary collapse
- #==(o) ⇒ Object
-
#initialize(res) ⇒ ResponseError
constructor
A new instance of ResponseError.
Constructor Details
#initialize(res) ⇒ ResponseError
Returns a new instance of ResponseError.
27 28 29 30 |
# File 'lib/fraggle/connection.rb', line 27 def initialize(res) @code = res.err_code super("#{res.name_for(Response::Err, code)}: #{res.err_detail}") end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
23 24 25 |
# File 'lib/fraggle/connection.rb', line 23 def code @code end |
Instance Method Details
#==(o) ⇒ Object
32 33 34 35 |
# File 'lib/fraggle/connection.rb', line 32 def ==(o) return false if ! o.kind_of?(self.class) code == o.code && == o. end |