Class: God::DriverOperation
- Inherits:
-
TimedEvent
- Object
- TimedEvent
- God::DriverOperation
- Defined in:
- lib/god/driver.rb
Overview
DriverEvent
Instance Attribute Summary collapse
-
#args ⇒ Object
Returns the value of attribute args.
-
#name ⇒ Object
Returns the value of attribute name.
-
#task ⇒ Object
Returns the value of attribute task.
Attributes inherited from TimedEvent
Instance Method Summary collapse
-
#handle_event ⇒ Object
Handle the next queued operation that was issued asynchronously.
-
#initialize(task, name, args) ⇒ DriverOperation
constructor
A new instance of DriverOperation.
Methods inherited from TimedEvent
Constructor Details
#initialize(task, name, args) ⇒ DriverOperation
Returns a new instance of DriverOperation.
41 42 43 44 45 46 |
# File 'lib/god/driver.rb', line 41 def initialize(task, name, args) super(0) self.task = task self.name = name self.args = args end |
Instance Attribute Details
#args ⇒ Object
Returns the value of attribute args.
39 40 41 |
# File 'lib/god/driver.rb', line 39 def args @args end |
#name ⇒ Object
Returns the value of attribute name.
39 40 41 |
# File 'lib/god/driver.rb', line 39 def name @name end |
#task ⇒ Object
Returns the value of attribute task.
39 40 41 |
# File 'lib/god/driver.rb', line 39 def task @task end |
Instance Method Details
#handle_event ⇒ Object
Handle the next queued operation that was issued asynchronously
Returns nothing
51 52 53 |
# File 'lib/god/driver.rb', line 51 def handle_event @task.send(@name, *@args) end |