Module: EMV::APDU

Defined in:
lib/emv/cps_apdu.rb,
lib/emv/emv_apdu.rb

Defined Under Namespace

Modules: CPS Classes: EMV_APDU, EXTERNAL_AUTHENTICATE, GET_CHALLENGE, INTERNAL_AUTHENTICATE, READ_RECORD, SELECT, VERIFY

Class Method Summary collapse

Class Method Details

.create_class(name, ins, cla = "80") ⇒ Object



9
10
11
12
13
14
15
16
# File 'lib/emv/emv_apdu.rb', line 9

def APDU.create_class name, ins, cla="80"
  cl =  "class #{name} < EMV_APDU\n"
  cl << "  cla \"\\x#{cla}\"\n" unless cla == "80"
  cl << "  ins \"\\x#{ins}\"\n"
  cl << "end"

   eval(cl)
end