Skip to content

Instantly share code, notes, and snippets.

@hardbap
Created February 23, 2012 23:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save hardbap/1895909 to your computer and use it in GitHub Desktop.
Save hardbap/1895909 to your computer and use it in GitHub Desktop.
rake task with default args
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