Class: CTAPI::Cardterminal::Manufacturer
- Inherits:
-
Object
- Object
- CTAPI::Cardterminal::Manufacturer
- Defined in:
- lib/ctapi.rb
Overview
A little structure for manufacturer information.
Instance Attribute Summary collapse
-
#manufacturer ⇒ Object
readonly
The manufacturer of this cardterminal.
-
#model ⇒ Object
readonly
The model name of this cardterminal.
-
#revision ⇒ Object
readonly
The revision number of this cardterminal.
Instance Method Summary collapse
-
#initialize(response) ⇒ Manufacturer
constructor
Creates a Manufacturer object for this cardterminal from a manufacturer status response.
-
#to_s ⇒ Object
A string of the form ‘manufacturer model revision’ is returned.
Constructor Details
#initialize(response) ⇒ Manufacturer
Creates a Manufacturer object for this cardterminal from a manufacturer status response.
360 361 362 363 |
# File 'lib/ctapi.rb', line 360 def initialize(response) @manufacturer, @model, @revision = response[0, 5], response[5, 3], response[10, 5] end |
Instance Attribute Details
#manufacturer ⇒ Object (readonly)
The manufacturer of this cardterminal.
366 367 368 |
# File 'lib/ctapi.rb', line 366 def manufacturer @manufacturer end |
#model ⇒ Object (readonly)
The model name of this cardterminal.
369 370 371 |
# File 'lib/ctapi.rb', line 369 def model @model end |
#revision ⇒ Object (readonly)
The revision number of this cardterminal.
372 373 374 |
# File 'lib/ctapi.rb', line 372 def revision @revision end |
Instance Method Details
#to_s ⇒ Object
A string of the form ‘manufacturer model revision’ is returned.
375 376 377 |
# File 'lib/ctapi.rb', line 375 def to_s [manufacturer, model, revision].join(" ") end |