From: sur max Date: 2007-02-15T03:33:52+09:00 Subject: Re: Drying a ternary condition ------=_Part_49950_18273577.1171478027981 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline klass.send(ARGV[0] ? :up : :down) On 2/14/07, Tim Pease wrote: > > On 2/14/07, Marcello Barnaba wrote: > > How would you write the following statement: > > > > klass.send((ARGV[0] || :up).to_sym == :up ? :up : :down) > > > > > ARGV[0] ? klass.send(:up) : klass.send(:down) > > > Blessings, > TwP > > -- sur http://expressica.com ------=_Part_49950_18273577.1171478027981--