Class: FiniteMachine::Const

Inherits:
Object
  • Object
show all
Defined in:
lib/finite_machine/const.rb

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Const

Returns a new instance of Const.



5
6
7
8
# File 'lib/finite_machine/const.rb', line 5

def initialize(name)
  @name = name.to_s
  freeze
end

Instance Method Details

#to_sObject Also known as: to_str, inspect



10
11
12
# File 'lib/finite_machine/const.rb', line 10

def to_s
  @name
end