Class: Stupidedi::Parser::IdentifierStack::Empty

Inherits:
Object
  • Object
show all
Defined in:
lib/stupidedi/parser/identifier_stack.rb

Instance Method Summary collapse

Constructor Details

#initialize(sequence) ⇒ Empty

Returns a new instance of Empty.



92
93
94
# File 'lib/stupidedi/parser/identifier_stack.rb', line 92

def initialize(sequence)
  @count, @sequence = 0, sequence
end

Instance Method Details

#countInteger

Returns number of interchanges (@note this is not needed by X12)

Returns:

  • (Integer)


103
104
105
# File 'lib/stupidedi/parser/identifier_stack.rb', line 103

def count
  @count
end

#isa



96
97
98
# File 'lib/stupidedi/parser/identifier_stack.rb', line 96

def isa
  ISA.new(self, @sequence).tap { @count += 1; @sequence.succ! }
end