Exception: Fraggle::Connection::ResponseError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/fraggle/connection.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#codeObject (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 && message == o.message
end