Sunday, September 13, 2009

rake task with arguments - Ruby Forum

Of course csh is evil! That's nothing new. This works just fine with bash:

rab://tmp $ cat Rakefile
namespace :foo do
desc 'lol'
task :bar, :num do |t, args|
puts "num = #{args.num}"

rab://tmp $ rake foo:bar[123]
(in /private/tmp)
num = 123

Hey look. Arguments in Rake. I've been looking for this for a while now. No more using env variables.

Posted via web from The Web and all that Jazz

No comments:

Post a Comment