Exception: Resol::Service::Failure
- Inherits:
-
StandardError
- Object
- StandardError
- Resol::Service::Failure
- Defined in:
- lib/resol/service.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#data ⇒ Object
Returns the value of attribute data.
Instance Method Summary collapse
-
#initialize(code, data) ⇒ Failure
constructor
A new instance of Failure.
- #inspect ⇒ Object
- #message ⇒ Object
Constructor Details
#initialize(code, data) ⇒ Failure
Returns a new instance of Failure.
14 15 16 17 18 |
# File 'lib/resol/service.rb', line 14 def initialize(code, data) self.code = code self.data = data super(data) end |
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
12 13 14 |
# File 'lib/resol/service.rb', line 12 def code @code end |
#data ⇒ Object
Returns the value of attribute data.
12 13 14 |
# File 'lib/resol/service.rb', line 12 def data @data end |
Instance Method Details
#inspect ⇒ Object
20 21 22 |
# File 'lib/resol/service.rb', line 20 def inspect "#{self.class.name}: #{}" end |
#message ⇒ Object
24 25 26 |
# File 'lib/resol/service.rb', line 24 def data ? "#{code.inspect} => #{data.inspect}" : code.inspect end |