Class: Stupidedi::Builder::IdentifierStack::ISA

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) ⇒ ISA

Returns a new instance of ISA.



64
65
66
# File 'lib/stupidedi/builder/identifier_stack.rb', line 64

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

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



62
63
64
# File 'lib/stupidedi/builder/identifier_stack.rb', line 62

def id
  @id
end

Instance Method Details

#countObject

Number of Functional Groups (GS..GE)



73
74
75
# File 'lib/stupidedi/builder/identifier_stack.rb', line 73

def count
  @count
end

#gsObject



68
69
70
# File 'lib/stupidedi/builder/identifier_stack.rb', line 68

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

#popObject



77
78
79
# File 'lib/stupidedi/builder/identifier_stack.rb', line 77

def pop
  @parent
end