Class: God::TimerEvent

Inherits:
Object
  • Object
show all
Defined in:
lib/god/timer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(condition, interval) ⇒ TimerEvent

Returns a new instance of TimerEvent.



6
7
8
9
# File 'lib/god/timer.rb', line 6

def initialize(condition, interval)
  self.condition = condition
  self.at = Time.now.to_i + interval
end

Instance Attribute Details

#atObject

Returns the value of attribute at.



4
5
6
# File 'lib/god/timer.rb', line 4

def at
  @at
end

#conditionObject

Returns the value of attribute condition.



4
5
6
# File 'lib/god/timer.rb', line 4

def condition
  @condition
end