Class: Hobo::Model::Lifecycles::State
- Inherits:
-
Struct
- Object
- Struct
- Hobo::Model::Lifecycles::State
- Includes:
- Actions
- Defined in:
- lib/hobo/model/lifecycles/state.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#on_enter ⇒ Object
Returns the value of attribute on_enter.
-
#transitions_out ⇒ Object
Returns the value of attribute transitions_out.
Instance Method Summary collapse
- #activate!(record) ⇒ Object
-
#initialize(*args) ⇒ State
constructor
A new instance of State.
Methods included from Actions
#acting_user_is?, #apply_user_becomes!, #available_to, #available_to_acting_user?, #can_run?, #fire_event, #get_state, #guard_ok?, #prepare!, #publishable?, #publishable_by, #routable_for?, #run_hook
Constructor Details
#initialize(*args) ⇒ State
Returns a new instance of State.
9 10 11 12 |
# File 'lib/hobo/model/lifecycles/state.rb', line 9 def initialize(*args) super self.transitions_out = [] end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name
5 6 7 |
# File 'lib/hobo/model/lifecycles/state.rb', line 5 def name @name end |
#on_enter ⇒ Object
Returns the value of attribute on_enter
5 6 7 |
# File 'lib/hobo/model/lifecycles/state.rb', line 5 def on_enter @on_enter end |
#transitions_out ⇒ Object
Returns the value of attribute transitions_out
5 6 7 |
# File 'lib/hobo/model/lifecycles/state.rb', line 5 def transitions_out @transitions_out end |
Instance Method Details
#activate!(record) ⇒ Object
15 16 17 |
# File 'lib/hobo/model/lifecycles/state.rb', line 15 def activate!(record) fire_event(record, on_enter) end |