rake task with easy interface
Right now I can do
rake report shipment_id=5
rake report do
id = ENV['shipment_id]
end
However I want to simplify the interace to the user by having
rake report 5
How do I do that in rake?
Last resort would be to use ruby and then call rake internally but I want to 开发者_StackOverflow中文版check if I am missing some feature of rake?
This could be useful: Rails Rake: How to pass in arguments to a task with :environment
Although its only for newer versions of rake.
精彩评论