Exception: Twib::ResultError

Inherits:
Error
  • Object
show all
Defined in:
lib/twib.rb

Overview

An error originating from either twibd or a remote device.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code) ⇒ ResultError

Returns a new instance of ResultError.



14
15
16
17
# File 'lib/twib.rb', line 14

def initialize(code)
  super("0x#{code.to_i.to_s(16)}")
  @code = code.to_i
end

Instance Attribute Details

#codeInteger (readonly)

Returns the bad result code that caused this error.

Returns:

  • (Integer)

    the bad result code that caused this error



20
21
22
# File 'lib/twib.rb', line 20

def code
  @code
end