Class: StateManager::DelayedJob::DelayedEvent

Inherits:
Struct
  • Object
show all
Defined in:
lib/state_manager/plugins/delayed_job.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#eventObject

Returns the value of attribute event

Returns:

  • (Object)

    the current value of event



10
11
12
# File 'lib/state_manager/plugins/delayed_job.rb', line 10

def event
  @event
end

#pathObject

Returns the value of attribute path

Returns:

  • (Object)

    the current value of path



10
11
12
# File 'lib/state_manager/plugins/delayed_job.rb', line 10

def path
  @path
end

#state_managerObject

Returns the value of attribute state_manager

Returns:

  • (Object)

    the current value of state_manager



10
11
12
# File 'lib/state_manager/plugins/delayed_job.rb', line 10

def state_manager
  @state_manager
end

Instance Method Details

#performObject



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