Class: Psychic::Runner::HotReadTaskFactory
- Inherits:
-
Object
- Object
- Psychic::Runner::HotReadTaskFactory
- Includes:
- BaseRunner
- Defined in:
- lib/psychic/runner/hot_read_task_factory.rb
Constant Summary
Constants included from BaseRunner
BaseRunner::DEFAULT_PARAMS_FILE
Constants included from Shell
Instance Attribute Summary
Attributes included from BaseRunner
#cwd, #env, #hints, #known_tasks, #tasks
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ HotReadTaskFactory
constructor
A new instance of HotReadTaskFactory.
- #task_for(task_name) ⇒ Object
Methods included from BaseRunner
#active?, #build_task, #dry_run?, #execute, #execute_task, included, #known_task?
Methods included from Logger
#log_level=, #logger, #new_logger
Methods included from Shell
Constructor Details
#initialize(opts = {}) ⇒ HotReadTaskFactory
Returns a new instance of HotReadTaskFactory.
5 6 7 8 9 |
# File 'lib/psychic/runner/hot_read_task_factory.rb', line 5 def initialize(opts = {}) super @tasks = hints['tasks'] || {} @known_tasks = @tasks.keys end |
Instance Method Details
#task_for(task_name) ⇒ Object
11 12 13 14 |
# File 'lib/psychic/runner/hot_read_task_factory.rb', line 11 def task_for(task_name) return @tasks[task_name.to_s] if @tasks.include? task_name.to_s super end |