Class: Barby::GS1128
- Defined in:
- lib/barby/barcode/gs1_128.rb
Overview
Constant Summary
Constants inherited from Code128
Code128::CODEA, Code128::CODEB, Code128::CODEC, Code128::CODEC_CHARS_RE, Code128::CONTROL_CHARACTERS, Code128::CTRL_RE, Code128::DGTS_RE, Code128::ENCODINGS, Code128::FNC1, Code128::FNC2, Code128::FNC3, Code128::FNC4, Code128::LOWR_RE, Code128::SHIFT, Code128::STARTA, Code128::STARTB, Code128::STARTC, Code128::STOP, Code128::TERMINATE, Code128::VALUES
Instance Attribute Summary collapse
-
#application_identifier ⇒ Object
Returns the value of attribute application_identifier.
Attributes inherited from Code128
Instance Method Summary collapse
- #application_identifier_encoding ⇒ Object
- #application_identifier_number ⇒ Object
- #data ⇒ Object
-
#initialize(data, type, ai) ⇒ GS1128
constructor
A new instance of GS1128.
- #partial_data ⇒ Object
- #to_s ⇒ Object
Methods inherited from Code128
apply_shortest_encoding_for_data, #change_code_encoding_for, #change_code_for, #change_code_for_class, #change_code_number_for, #characters, #checksum, #checksum_encoding, class_for, #class_for, #data=, #data_encoding, #data_encoding_with_extra_encoding, determine_best_type_for_data, #encoding, #encoding_for, #encodings, #extra, #extra=, #extra_encoding, #extra_numbers, #full_data, #full_data_with_change_codes, #full_extra_data, #full_extra_data_with_change_code, #numbers, #start_character, #start_encoding, #start_num, #stop_encoding, #valid?, #values
Methods inherited from Barcode
#encoding, #method_missing, #outputter_class_for, #outputter_for, outputters, register_outputter, #two_dimensional?, #valid?
Constructor Details
#initialize(data, type, ai) ⇒ GS1128
Returns a new instance of GS1128.
15 16 17 18 19 |
# File 'lib/barby/barcode/gs1_128.rb', line 15 def initialize(data, type, ai) warn "DEPRECATED: The GS1128 class has been deprecated, use Code128 directly instead (called from #{caller[0]})" self.application_identifier = ai super(data, type) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Barby::Barcode
Instance Attribute Details
#application_identifier ⇒ Object
Returns the value of attribute application_identifier.
13 14 15 |
# File 'lib/barby/barcode/gs1_128.rb', line 13 def application_identifier @application_identifier end |
Instance Method Details
#application_identifier_encoding ⇒ Object
34 35 36 |
# File 'lib/barby/barcode/gs1_128.rb', line 34 def application_identifier_encoding encodings[application_identifier_number] end |
#application_identifier_number ⇒ Object
30 31 32 |
# File 'lib/barby/barcode/gs1_128.rb', line 30 def application_identifier_number values[application_identifier] end |
#data ⇒ Object
22 23 24 |
# File 'lib/barby/barcode/gs1_128.rb', line 22 def data FNC1+application_identifier+super end |
#partial_data ⇒ Object
26 27 28 |
# File 'lib/barby/barcode/gs1_128.rb', line 26 def partial_data @data end |
#to_s ⇒ Object
38 39 40 |
# File 'lib/barby/barcode/gs1_128.rb', line 38 def to_s "(#{application_identifier}) #{partial_data}" end |