Created
November 18, 2011 01:58
-
-
Save chensoren/1375314 to your computer and use it in GitHub Desktop.
Rake task with arguments and :environment
This file contains hidden or 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 "Rake task with arguments and :environment" | |
task :task_name, [:arg1, :arg2] => :environment do |t, args| | |
args.with_defaults(:arg1 => "Foo", :arg2 => "Bar") | |
puts "Hello, #{args.arg1}. Bye, #{args.arg2}." | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment