Class: GS1::SyntaxDictionary::Parser::Entry

Inherits:
Object
  • Object
show all
Defined in:
lib/gs1/syntax_dictionary/parser.rb

Overview

Corresponds to a single entry in the syntax dictionary.

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#aiString (readonly)

Returns the application identifier.

Returns:

  • (String)

    the application identifier



27
28
29
# File 'lib/gs1/syntax_dictionary/parser.rb', line 27

def ai
  @ai
end

#lengthRange<Integer> (readonly)

Returns the length of the AI.

Returns:

  • (Range<Integer>)

    the length of the AI



33
34
35
# File 'lib/gs1/syntax_dictionary/parser.rb', line 33

def length
  @length
end

#separator_requiredBoolean (readonly)

Returns indicates if a separator is required or not.

Returns:

  • (Boolean)

    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

#titleString (readonly)

Returns the title of the AI.

Returns:

  • (String)

    the title of the AI



36
37
38
# File 'lib/gs1/syntax_dictionary/parser.rb', line 36

def title
  @title
end