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.



45
46
47
# File 'lib/stupidedi/builder/identifier_stack.rb', line 45

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

Instance Method Details

#countObject

Number of Interchanges (ISA..IEA)



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

def count
  @count
end

#isaObject



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

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