Created
June 15, 2009 16:14
-
-
Save tinogomes/130194 to your computer and use it in GitHub Desktop.
Rake with arguments
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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