From: Rick DeNatale Date: 2009-04-27T21:46:30+09:00 Subject: Re: Block Style On Mon, Apr 27, 2009 at 7:00 AM, Brian Adkins wrote: > Rick DeNatale writes: > >> http://talklikeaduck.denhaven2.com/2007/10/02/ruby-blocks-do-or-brace > > FYI - looks like you have an extra trailing paren here in the last > code example: > >  description 'pickup up the leaves' >  task(:rake => pre_raking_tasks) {#code to rake the leaves}) Yeah that was a cut and past typo in the sequence of examples. > > BTW - this is one of the reasons I tend to use parens on function > invocations consistently. I also tend to use more parentheses than most rubyists, but I don't normally use them in the face of a DSL method, so I use attr_reader :foo alias_method :meth1, :meth2 has_many :widgets, :through => :gadet_widget_usage task :doit => :didit rather than attr_reader(:foo) alias_method(:meth1, :meth2) has_many(:widgets, :through => :gadet_widget_usage) task(:doit => :didit) As I said eariler, I eschew dogmatism. I agree with Ralph Waldo Emerson's "A foolish consistency is the hobgoblin of little minds." -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickDeNatale WWR: http://www.workingwithrails.com/person/9021-rick-denatale LinkedIn: http://www.linkedin.com/in/rickdenatale