Class: Taskinator::Executor

Inherits:
Object
  • Object
show all
Defined in:
lib/taskinator/executor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(definition, task = nil) ⇒ Executor

Returns a new instance of Executor.



7
8
9
10
11
12
13
14
# File 'lib/taskinator/executor.rb', line 7

def initialize(definition, task=nil)
  @definition = definition
  @task = task

  # include the module into the eigen class, so it is only for this instance
  eigen = class << self; self; end
  eigen.send :include, definition
end

Instance Attribute Details

#definitionObject (readonly)

Returns the value of attribute definition.



4
5
6
# File 'lib/taskinator/executor.rb', line 4

def definition
  @definition
end

#taskObject (readonly)

Returns the value of attribute task.



5
6
7
# File 'lib/taskinator/executor.rb', line 5

def task
  @task
end