Class: Barby::Code25IATA

Inherits:
Code25 show all
Defined in:
lib/barby/barcode/code_25_iata.rb

Overview

The IATA version of 2 of 5 is identical to its parent except for different start and stop codes. This is the one used on the tags they put on your luggage when you check it in at the airport.

Constant Summary collapse

START_ENCODING =
[N,N]
STOP_ENCODING =
[W,N]

Constants inherited from Code25

Barby::Code25::ENCODINGS, Barby::Code25::NARROW, Barby::Code25::WIDE

Instance Attribute Summary

Attributes inherited from Code25

#data, #include_checksum, #narrow_width, #space_width, #wide_width

Instance Method Summary collapse

Methods inherited from Code25

#characters, #characters_with_checksum, #checksum, #checksum_encoding, #data_encoding, #data_encoding_with_checksum, #digit_encodings, #digit_encodings_with_checksum, #digits, #digits_with_checksum, #encoding, #encoding_for, #encoding_for_bars, #encoding_for_bars_without_end_space, #even_and_odd_digits, #include_checksum?, #initialize, #narrow_encoding, #space_encoding, #to_s, #valid?, #wide_encoding

Methods inherited from Barcode

#encoding, #method_missing, #outputter_class_for, #outputter_for, outputters, register_outputter, #to_s, #two_dimensional?, #valid?

Constructor Details

This class inherits a constructor from Barby::Code25

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Barby::Barcode

Instance Method Details

#start_encodingObject



13
14
15
# File 'lib/barby/barcode/code_25_iata.rb', line 13

def start_encoding
  encoding_for_bars(START_ENCODING)
end

#stop_encodingObject



17
18
19
# File 'lib/barby/barcode/code_25_iata.rb', line 17

def stop_encoding
  encoding_for_bars_without_end_space(STOP_ENCODING)
end