Using comments as rake task descriptions

Over lunch at Scotland on Rails, Jim, Chad, and I got talking about the way you use desc to document tasks in rake.

desc "Remove intermediate files and other work products"
task :cleanup do
  ...
end

This has always been an interesting feature of rake—the idea that you have a kind of temporal coupling between one method call and the next. It works well, but somehow it's always struck me as a little obtrusive.


So, during the afternoon, I hacked up a quick change to rake that looks for a single-line...

 •  0 comments  •  flag
Share on Twitter
Published on March 27, 2009 03:56
No comments have been added yet.