Class: Stupidedi::Parser::IdentifierStack::Sequence

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

Overview

State Representations

Instance Method Summary collapse

Constructor Details

#initialize(start) ⇒ Sequence

Returns a new instance of Sequence.


78
79
80
# File 'lib/stupidedi/parser/identifier_stack.rb', line 78

def initialize(start)
  @value = start
end

Instance Method Details

#succ!


82
83
84
# File 'lib/stupidedi/parser/identifier_stack.rb', line 82

def succ!
  self.tap { @value += 1 }
end

#value


86
87
88
# File 'lib/stupidedi/parser/identifier_stack.rb', line 86

def value
  @value
end