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.
27 28 29 30 31 |
# File 'lib/god/driver.rb', line 27 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.
25 26 27 |
# File 'lib/god/driver.rb', line 25 def condition @condition end |
#task ⇒ Object
Returns the value of attribute task.
25 26 27 |
# File 'lib/god/driver.rb', line 25 def task @task end |
Instance Method Details
#handle_event ⇒ Object
33 34 35 |
# File 'lib/god/driver.rb', line 33 def handle_event @task.handle_poll(@condition) end |