Module: Motion::Component::PeriodicTimers

Extended by:
ActiveSupport::Concern
Includes:
ModuleFunctions
Included in:
Motion::Component
Defined in:
lib/motion/component/periodic_timers.rb

Defined Under Namespace

Modules: ModuleFunctions

Instance Method Summary collapse

Methods included from ModuleFunctions

#every, #periodic_timer, #periodic_timers, #stop_periodic_timer

Instance Method Details

#process_periodic_timer(name) ⇒ Object



52
53
54
55
56
57
58
# File 'lib/motion/component/periodic_timers.rb', line 52

def process_periodic_timer(name)
  return unless (handler, _interval = _periodic_timers[name])

  _run_action_callbacks(context: handler) do
    send(handler)
  end
end