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.
48 49 50 51 52 53 |
# File 'lib/god/driver.rb', line 48 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.
46 47 48 |
# File 'lib/god/driver.rb', line 46 def args @args end |
#name ⇒ Object
Returns the value of attribute name.
46 47 48 |
# File 'lib/god/driver.rb', line 46 def name @name end |
#task ⇒ Object
Returns the value of attribute task.
46 47 48 |
# File 'lib/god/driver.rb', line 46 def task @task end |
Instance Method Details
#handle_event ⇒ Object
Handle the next queued operation that was issued asynchronously
Returns nothing
58 59 60 |
# File 'lib/god/driver.rb', line 58 def handle_event @task.send(@name, *@args) end |