Class: StateManager::DelayedJob::DelayedEvent
- Inherits:
-
Struct
- Object
- Struct
- StateManager::DelayedJob::DelayedEvent
- Defined in:
- lib/state_manager/plugins/delayed_job.rb
Instance Attribute Summary collapse
-
#event ⇒ Object
Returns the value of attribute event.
-
#path ⇒ Object
Returns the value of attribute path.
-
#state_manager ⇒ Object
Returns the value of attribute state_manager.
Instance Method Summary collapse
Instance Attribute Details
#event ⇒ Object
Returns the value of attribute event
10 11 12 |
# File 'lib/state_manager/plugins/delayed_job.rb', line 10 def event @event end |
#path ⇒ Object
Returns the value of attribute path
10 11 12 |
# File 'lib/state_manager/plugins/delayed_job.rb', line 10 def path @path end |
#state_manager ⇒ Object
Returns the value of attribute state_manager
10 11 12 |
# File 'lib/state_manager/plugins/delayed_job.rb', line 10 def state_manager @state_manager end |
Instance Method Details
#perform ⇒ Object
11 12 13 14 15 |
# File 'lib/state_manager/plugins/delayed_job.rb', line 11 def perform return unless state_manager.respond_to_event?(event[:name]) && state_manager.in_state?(path) state_manager.send_event! event[:name] end |