Top Level Namespace

Defined Under Namespace

Modules: PrettyMultitask

Instance Method Summary collapse

Instance Method Details

#pretty_multitask(hash) ⇒ Object



23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/pretty_multitask.rb', line 23

def pretty_multitask(hash)
  name = hash.keys.first
  tasks = hash.values.first
  task name do
    jobs = []
    tasks.each do |t|
      job = proc do
        Rake::Task[t].invoke
        nil
      end
      jobs.push({ name: t, cmd: job })
    end
    PrettyMultitask::Runner.new(jobs).run
  end
end