Class: Scheduler::ProcTask

Inherits:
Object show all
Defined in:
docs/0_Dependencies.rb

Overview

Description of a Task that execute a Proc

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, priority, proc_object) ⇒ ProcTask

Initialize a ProcTask with its name, priority and the Proc it executes

Parameters:

  • name (String)

    name that describe the task

  • priority (Integer)

    the priority of the task

  • proc_object (Proc)

    the proc (with no param) of the task



187
188
# File 'docs/0_Dependencies.rb', line 187

def initialize(name, priority, proc_object)
end

Instance Attribute Details

#nameString (readonly)

Name that describe the task

Returns:



182
183
184
# File 'docs/0_Dependencies.rb', line 182

def name
  @name
end

#priorityInteger (readonly)

Priority of the task

Returns:

  • (Integer)


179
180
181
# File 'docs/0_Dependencies.rb', line 179

def priority
  @priority
end

Instance Method Details

#start

Invoke the #call method of the proc



190
191
# File 'docs/0_Dependencies.rb', line 190

def start
end