Skip to content

Instantly share code, notes, and snippets.

@demelziraptor
Last active August 29, 2015 14:03
Show Gist options
  • Save demelziraptor/d7991b98c5d7ed49c27d to your computer and use it in GitHub Desktop.
Save demelziraptor/d7991b98c5d7ed49c27d to your computer and use it in GitHub Desktop.
Pretty rake arguments

Output:

$ rake test_task test hello whatsup?
["test", "hello", "whatsup?"]
task :test_task do
args = ARGV[1..-1]
puts args.inspect
args.each do |arg|
task arg.to_sym do ; end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment