From: Robert Klemme Date: 2012-04-26T20:38:59+09:00 Subject: Re: A question of style On Thu, Apr 26, 2012 at 1:33 PM, Michel Demazure wrote: > When you write something like > > def foo(var) >  if test(var) >    bar(...) >    log(...) >  else >    bar(...) >    log(...) >  end > end > > tools like reek complain (two duplications, long method,...), and > somehow push you to write > > def foo(var) >  test(var) ? do_this : do_that > end > def do_this ... end > def do_that ... end > > I still do prefer the first variant which shows more clearly the > parallel intentions. > > What do you people think ? I think the conditional is completely superfluous. Or are there any differences in the two branches? I can't see any... What does the real code look like? Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/