Files

Class/Module Index [+]

Quicksearch

God::DriverOperation

A DriverOperation is a TimedEvent that is due as soon as possible. It is used to execute an arbitrary method on the associated Task.

Public Class Methods

new(task, name, args) click to toggle source

Initialize a new DriverOperation.

task - The Task upon which to operate. name - The Symbol name of the method to call. args - The Array of arguments to send to the method.

# File lib/god/driver.rb, line 76
def initialize(task, name, args)
  super(0)
  @task = task
  @name = name
  @args = args
end

Public Instance Methods

handle_event() click to toggle source

Handle the operation that was issued asynchronously.

Returns nothing.

# File lib/god/driver.rb, line 86
def handle_event
  @task.send(@name, *@args)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.