Skip to content

Instantly share code, notes, and snippets.

@tinogomes
Created June 15, 2009 16:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tinogomes/130194 to your computer and use it in GitHub Desktop.
Save tinogomes/130194 to your computer and use it in GitHub Desktop.
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