Class: Stupidedi::Parser::IdentifierStack::ISA
- Inherits:
-
Object
- Object
- Stupidedi::Parser::IdentifierStack::ISA
- Defined in:
- lib/stupidedi/parser/identifier_stack.rb
Instance Attribute Summary collapse
-
#id
readonly
Returns the value of attribute id.
Instance Method Summary collapse
-
#count ⇒ Integer
Number of Transaction Sets Included (IEA01).
- #gs(start = nil)
-
#initialize(parent, sequence) ⇒ ISA
constructor
A new instance of ISA.
- #pop
- #pop_isa
Constructor Details
#initialize(parent, sequence) ⇒ ISA
Returns a new instance of ISA.
111 112 113 |
# File 'lib/stupidedi/parser/identifier_stack.rb', line 111 def initialize(parent, sequence) @count, @parent, @sequence, @id = 0, parent, sequence, sequence.value end |
Instance Attribute Details
#id (readonly)
Returns the value of attribute id.
109 110 111 |
# File 'lib/stupidedi/parser/identifier_stack.rb', line 109 def id @id end |
Instance Method Details
#count ⇒ Integer
Number of Transaction Sets Included (IEA01)
123 124 125 |
# File 'lib/stupidedi/parser/identifier_stack.rb', line 123 def count @count end |
#gs(start = nil)
115 116 117 118 |
# File 'lib/stupidedi/parser/identifier_stack.rb', line 115 def gs(start = nil) sequence = start.try{|n| Sequence.new(n) } || @sequence GS.new(self, sequence).tap { @count += 1; sequence.succ! } end |
#pop
131 132 133 134 |
# File 'lib/stupidedi/parser/identifier_stack.rb', line 131 def pop warn "DEPRECATION WARNING: IdentifierStack#pop is deprecated, use pop_isa (when removing an ISA identifier from the stack)" pop_isa end |
#pop_isa
127 128 129 |
# File 'lib/stupidedi/parser/identifier_stack.rb', line 127 def pop_isa @parent end |