Class: Stupidedi::Builder::IdentifierStack::Empty

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

Overview

State Representations

Instance Method Summary collapse

Constructor Details

#initialize(id) ⇒ Empty

Returns a new instance of Empty.



49
50
51
# File 'lib/stupidedi/builder/identifier_stack.rb', line 49

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

Instance Method Details

#countObject

Number of Interchanges (ISA..IEA)



58
59
60
# File 'lib/stupidedi/builder/identifier_stack.rb', line 58

def count
  @count
end

#isaObject



53
54
55
# File 'lib/stupidedi/builder/identifier_stack.rb', line 53

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