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.



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

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

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



81
82
83
# File 'lib/stupidedi/builder/identifier_stack.rb', line 81

def id
  @id
end

Instance Method Details

#countInteger

GE01 Number of Transaction Sets (within current functional group)

Returns:



94
95
96
# File 'lib/stupidedi/builder/identifier_stack.rb', line 94

def count
  @count
end

#popObject



98
99
100
# File 'lib/stupidedi/builder/identifier_stack.rb', line 98

def pop
  @parent
end

#stObject



87
88
89
# File 'lib/stupidedi/builder/identifier_stack.rb', line 87

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