Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Rake with arguments
desc "Say hi. Use USER environment variable as default"
task :hi, :user do |t, args|
args.with_defaults(:user => ENV["USER"])
puts "Hi #{args[:user]}!"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment