In Files

Parent

Files

CTAPI::Command

A command sent to the cardterminal.

Public Class Methods

from_array(command) click to toggle source

A Command is generated from an array of bytes of the form [ 0x12, 0x23, 0xa4].

# File lib/ctapi.rb, line 430
    def self.from_array(command)
      new(command.pack('C*'))
    end
from_string(command) click to toggle source

A Command is generated from a string of the form ‘12:23:a4’ or ‘12 23 a4’.

# File lib/ctapi.rb, line 423
    def self.from_string(command)
      command = command.split(/[ :]/).map { |x| Integer '0x' + x }
      from_array(command)
    end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.