Skip to content

Instantly share code, notes, and snippets.

@brainwire
Created November 21, 2014 17:57
Show Gist options
  • Save brainwire/91d9c51a7269b2d15f5c to your computer and use it in GitHub Desktop.
Save brainwire/91d9c51a7269b2d15f5c to your computer and use it in GitHub Desktop.
rake
task :name, [:first_param, :second_param]
task :name, [:first_param, :second_param] do |t, args|
  args.with_defaults(:first_param => "John", :second_param => "Dough")
  puts "First is #{args.first_param}"
  puts "Second is #{args.second_param}"
end
task :name, [:first_param, :second_param] => [:pre_task] do |t, args|
  args.with_defaults(:first_param => "John", :second_param => "Dough")
  puts "First is #{args.first_name}"
  puts "Second is #{args.second_param}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment