Class: Resyma::Core::State

Inherits:
Object
  • Object
show all
Defined in:
lib/resyma/core/automaton/state.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id) ⇒ State

Returns a new instance of State.



4
5
6
# File 'lib/resyma/core/automaton/state.rb', line 4

def initialize(id)
  @id = id
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



8
9
10
# File 'lib/resyma/core/automaton/state.rb', line 8

def id
  @id
end

Class Method Details

.with_id(id) ⇒ Resyma::Core::State

Returns a new State whose ID is ‘id`

Parameters:

  • id (Integer)

    ID of the state

Returns:



17
18
19
# File 'lib/resyma/core/automaton/state.rb', line 17

def self.with_id(id)
  new(id)
end