Created
February 23, 2012 23:56
-
-
Save hardbap/1895909 to your computer and use it in GitHub Desktop.
rake task with default args
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
namespace :tweets do | |
desc 'Send some tweets to a user' | |
task :send, [:username] => [:environment] do |t, args| | |
args.with_defaults(:username => 'cpytel') | |
Tweet.send(args[:username]) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment