module Draco::Periodic::InstanceMethods
Internal: Overrides the tick method to check that we want to run the system on the current tick.
Public Instance Methods
period()
click to toggle source
# File lib/draco/periodic.rb, line 22 def period self.class.instance_variable_get(:@period) || 1 end
tick(context)
click to toggle source
Calls superclass method
# File lib/draco/periodic.rb, line 18 def tick(context) super if (context.state.tick_count % period).zero? end