Class: RailsStateMachine::State
- Inherits:
-
Object
- Object
- RailsStateMachine::State
- Defined in:
- lib/rails_state_machine/state.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #initial? ⇒ Boolean
-
#initialize(name, **options) ⇒ State
constructor
A new instance of State.
Constructor Details
#initialize(name, **options) ⇒ State
Returns a new instance of State.
5 6 7 8 |
# File 'lib/rails_state_machine/state.rb', line 5 def initialize(name, **) @name = name @options = end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/rails_state_machine/state.rb', line 3 def name @name end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
3 4 5 |
# File 'lib/rails_state_machine/state.rb', line 3 def @options end |
Instance Method Details
#initial? ⇒ Boolean
10 11 12 |
# File 'lib/rails_state_machine/state.rb', line 10 def initial? !![:initial] end |