Module: MRZ

Defined in:
lib/mrz.rb,
lib/mrz/result.rb,
lib/mrz/version.rb,
lib/mrz/td1_parser.rb,
lib/mrz/td2_parser.rb,
lib/mrz/td3_parser.rb,
lib/mrz/check_digit.rb,
lib/mrz/invalid_format_error.rb

Defined Under Namespace

Modules: CheckDigit Classes: InvalidFormatError, Result, TD1Parser, TD2Parser, TD3Parser

Constant Summary collapse

VERSION =
"0.2.0"

Class Method Summary collapse

Class Method Details

.parse(mrz_code) ⇒ Object



11
12
13
14
15
16
17
18
19
20
# File 'lib/mrz.rb', line 11

def self.parse(mrz_code)
  case determine_type(mrz_code)
  when :td1
    TD1Parser.new(mrz_code).parse
  when :td2
    TD2Parser.new(mrz_code).parse
  when :td3
    TD3Parser.new(mrz_code).parse
  end
end