Class: Stupidedi::Builder::IdentifierStack::GS

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(parent, id) ⇒ GS

Returns a new instance of GS.



85
86
87
# File 'lib/stupidedi/builder/identifier_stack.rb', line 85

def initialize(parent, id)
  @count, @parent, @next, @id = 0, parent, id, id
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



83
84
85
# File 'lib/stupidedi/builder/identifier_stack.rb', line 83

def id
  @id
end

Instance Method Details

#countInteger

GE01 Number of Transaction Sets (within current functional group)

Returns:

  • (Integer)


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

def count
  @count
end

#popObject



100
101
102
# File 'lib/stupidedi/builder/identifier_stack.rb', line 100

def pop
  @parent
end

#stObject



89
90
91
# File 'lib/stupidedi/builder/identifier_stack.rb', line 89

def st
  ST.new(self, @next).tap { @count += 1; @next += 1 }
end