Class: FiniteMachine::Const
- Inherits:
-
Object
- Object
- FiniteMachine::Const
- Defined in:
- lib/finite_machine/const.rb
Instance Method Summary collapse
-
#initialize(name) ⇒ Const
constructor
A new instance of Const.
- #to_s ⇒ Object (also: #to_str, #inspect)
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_s ⇒ Object Also known as: to_str, inspect
10 11 12 |
# File 'lib/finite_machine/const.rb', line 10 def to_s @name end |