Module: Crosstest::Psychic::TaskRunner

Included in:
Crosstest::Psychic
Defined in:
lib/crosstest/psychic/task_runner.rb

Instance Method Summary collapse

Instance Method Details

#known_tasksSet<Task>

Lists all known tasks. This will include tasks that have been manually alased in `psychic.yaml`, well-known tasks for detected tools, and possibly some dynamically detected tasks for tools that support task discovery.


19
20
21
# File 'lib/crosstest/psychic/task_runner.rb', line 19

def known_tasks
  task_factory_manager.known_tasks
end

#task(task_alias) ⇒ Task

Chooses an appropriate task for the task alias


7
8
9
10
11
12
# File 'lib/crosstest/psychic/task_runner.rb', line 7

def task(task_alias)
  task_factory = task_factory_manager.factories_for(task_alias).last
  fail TaskNotImplementedError, task_alias if task_factory.nil? || task_factory.priority == 0
  command = task_factory.command_for_task(task_alias)
  Task.new(self, command)
end

#task_factory_managerObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


24
25
26
# File 'lib/crosstest/psychic/task_runner.rb', line 24

def task_factory_manager
  @task_factory_manager ||= TaskFactoryManager.new(self, opts)
end