Class: Shuttle::Task
- Inherits:
-
Object
- Object
- Shuttle::Task
- Defined in:
- lib/shuttle/task.rb
Instance Method Summary collapse
-
#initialize(deploy, task_name, allow_failures = false) ⇒ Task
constructor
A new instance of Task.
- #run ⇒ Object
Constructor Details
#initialize(deploy, task_name, allow_failures = false) ⇒ Task
Returns a new instance of Task.
3 4 5 6 7 |
# File 'lib/shuttle/task.rb', line 3 def initialize(deploy, task_name, allow_failures = false) @deploy = deploy @task_name = task_name @allow_failures = allow_failures end |
Instance Method Details
#run ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/shuttle/task.rb', line 9 def run commands = find_task_commands(@task_name) if commands.nil? @deploy.error("Unable to find task: #{@task_name}") end commands.each do |cmd| execute(@task_name, cmd, @allow_failures) end end |