Class: AAMVA::Decoder

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(standard, barcode) ⇒ Decoder

Returns a new instance of Decoder.



7
8
9
10
# File 'lib/aamva/decoder.rb', line 7

def initialize(standard, barcode)
  @standard = standard
  @barcode = barcode
end

Instance Attribute Details

#barcodeObject (readonly)

Returns the value of attribute barcode.



5
6
7
# File 'lib/aamva/decoder.rb', line 5

def barcode
  @barcode
end

#standardObject (readonly)

Returns the value of attribute standard.



5
6
7
# File 'lib/aamva/decoder.rb', line 5

def standard
  @standard
end

Instance Method Details

#dataObject



12
13
14
15
16
17
18
# File 'lib/aamva/decoder.rb', line 12

def data
  @data ||= Data.new(
    header: header,
    subfile_designators: subfile_designators,
    subfiles: subfiles
  )
end