Class: Patcmd::Commands::Exec

Inherits:
Base
  • Object
show all
Defined in:
lib/patcmd/commands/exec.rb

Instance Method Summary collapse

Instance Method Details

#execute(name) ⇒ Object



11
12
13
14
15
16
17
18
19
20
# File 'lib/patcmd/commands/exec.rb', line 11

def execute(name)
  tasks = Configuration.load_tasks
  unless tasks[name]
    say("Task '#{name}' not found.", :red)
    exit(1)
  end
  task = Task.new(name, tasks[name])
  say("Running task '#{name}'...", :green)
  task.execute
end