Within a rake task how does one query the description? Something that would give:
desc "Populate DB"
task populate: :environment do
puts task.desc # "Populate DB"
end
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
taskmust be defined as a parameter for the task-block.Edit:
This solution works with rake 0.8.7. At least rake 0.9.2.2 need an additional
Rake::TaskManager.record_task_metadata = true(I checked only this two versions).A stand alone ruby-script with adaption:
Reason: in
rake/task_manager.rbline 30 (rake 0.9.2.2) is a checkThe default
falseis set in line 305.