Exception: Ftdi::StatusCodeError
Overview
Represents error of libftdi with its status code.
Instance Attribute Summary collapse
-
#status_code ⇒ Fixnum
readonly
Gets status code.
Instance Method Summary collapse
-
#initialize(status_code, message) ⇒ StatusCodeError
constructor
A new instance of StatusCodeError.
-
#to_s ⇒ String
Gets string representation of the error.
Constructor Details
#initialize(status_code, message) ⇒ StatusCodeError
Returns a new instance of StatusCodeError.
65 66 67 68 |
# File 'lib/ftdi.rb', line 65 def initialize(status_code, ) super() @status_code = status_code end |
Instance Attribute Details
#status_code ⇒ Fixnum (readonly)
Gets status code.
63 64 65 |
# File 'lib/ftdi.rb', line 63 def status_code @status_code end |
Instance Method Details
#to_s ⇒ String
Gets string representation of the error.
72 73 74 |
# File 'lib/ftdi.rb', line 72 def to_s "#{status_code}: #{super}" end |