Class: GS1::SyntaxDictionary::Parser::Entry
- Inherits:
-
Object
- Object
- GS1::SyntaxDictionary::Parser::Entry
- Defined in:
- lib/gs1/syntax_dictionary/parser.rb
Overview
Corresponds to a single entry in the syntax dictionary.
Instance Attribute Summary collapse
-
#ai ⇒ String
readonly
The application identifier.
-
#length ⇒ Range<Integer>
readonly
The length of the AI.
-
#separator_required ⇒ Boolean
readonly
Indicates if a separator is required or not.
-
#title ⇒ String
readonly
The title of the AI.
Instance Method Summary collapse
-
#initialize(ai:, separator_required:, length:, title:) ⇒ Entry
constructor
rubocop:disable Naming/MethodParameterName.
Constructor Details
#initialize(ai:, separator_required:, length:, title:) ⇒ Entry
rubocop:disable Naming/MethodParameterName
39 40 41 42 43 44 45 |
# File 'lib/gs1/syntax_dictionary/parser.rb', line 39 def initialize(ai:, separator_required:, length:, title:) # rubocop:enable Naming/MethodParameterName @ai = ai @separator_required = separator_required @length = length @title = title end |
Instance Attribute Details
#ai ⇒ String (readonly)
Returns the application identifier.
27 28 29 |
# File 'lib/gs1/syntax_dictionary/parser.rb', line 27 def ai @ai end |
#length ⇒ Range<Integer> (readonly)
Returns the length of the AI.
33 34 35 |
# File 'lib/gs1/syntax_dictionary/parser.rb', line 33 def length @length end |
#separator_required ⇒ Boolean (readonly)
Returns indicates if a separator is required or not.
30 31 32 |
# File 'lib/gs1/syntax_dictionary/parser.rb', line 30 def separator_required @separator_required end |
#title ⇒ String (readonly)
Returns the title of the AI.
36 37 38 |
# File 'lib/gs1/syntax_dictionary/parser.rb', line 36 def title @title end |