Class: CTAPI::Cardterminal::Manufacturer

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

Overview

A little structure for manufacturer information.

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#manufacturerObject (readonly)

The manufacturer of this cardterminal.



366
367
368
# File 'lib/ctapi.rb', line 366

def manufacturer
  @manufacturer
end

#modelObject (readonly)

The model name of this cardterminal.



369
370
371
# File 'lib/ctapi.rb', line 369

def model
  @model
end

#revisionObject (readonly)

The revision number of this cardterminal.



372
373
374
# File 'lib/ctapi.rb', line 372

def revision
  @revision
end

Instance Method Details

#to_sObject

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