Class: God::TimerEvent
- Inherits:
-
Object
- Object
- God::TimerEvent
- Defined in:
- lib/god/timer.rb
Instance Attribute Summary collapse
-
#at ⇒ Object
Returns the value of attribute at.
-
#condition ⇒ Object
Returns the value of attribute condition.
Instance Method Summary collapse
-
#initialize(condition, interval) ⇒ TimerEvent
constructor
A new instance of TimerEvent.
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
#at ⇒ Object
Returns the value of attribute at.
4 5 6 |
# File 'lib/god/timer.rb', line 4 def at @at end |
#condition ⇒ Object
Returns the value of attribute condition.
4 5 6 |
# File 'lib/god/timer.rb', line 4 def condition @condition end |