Class: God::DriverEvent
- Inherits:
-
TimedEvent
- Object
- TimedEvent
- God::DriverEvent
- Defined in:
- lib/god/driver.rb
Overview
DriverEvent
Instance Attribute Summary collapse
-
#condition ⇒ Object
Returns the value of attribute condition.
-
#task ⇒ Object
Returns the value of attribute task.
Attributes inherited from TimedEvent
Instance Method Summary collapse
- #handle_event ⇒ Object
-
#initialize(delay, task, condition) ⇒ DriverEvent
constructor
A new instance of DriverEvent.
Methods inherited from TimedEvent
Constructor Details
#initialize(delay, task, condition) ⇒ DriverEvent
Returns a new instance of DriverEvent.
34 35 36 37 38 |
# File 'lib/god/driver.rb', line 34 def initialize(delay, task, condition) super delay self.task = task self.condition = condition end |
Instance Attribute Details
#condition ⇒ Object
Returns the value of attribute condition.
32 33 34 |
# File 'lib/god/driver.rb', line 32 def condition @condition end |
#task ⇒ Object
Returns the value of attribute task.
32 33 34 |
# File 'lib/god/driver.rb', line 32 def task @task end |
Instance Method Details
#handle_event ⇒ Object
40 41 42 |
# File 'lib/god/driver.rb', line 40 def handle_event @task.handle_poll(@condition) end |