--1926193751-1293460271-1246198701954
Content-Type: MULTIPART/MIXED; BOUNDARY="1926193751-1293460271-1246198701=:4954"

  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

--1926193751-1293460271-1246198701954
Content-Type: TEXT/PLAIN; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8BIT

Hi --

On Sun, 28 Jun 2009, Gregory Brown wrote:

> On Sat, Jun 27, 2009 at 11:26 PM, Daniel DeLorme<dan-ml / dan42.com> wrote:
>> Gregory Brown wrote:
>>>
>>> Anyway, here's a better way to solve the problem that probably
>>> addresses your concerns:
>>>
>>> def name(*args)
>>> return @name if args.empty?
>>>  ¨Âîáíå  òçó®æéòó>>> end
>>
>> Another way to do this is to use some kind of singleton object
>>
>> Nothing  bject.new
>> def name(value  othing)
>>  ¨Âîáíå  áìõå õîìåóó öáìõÎïôèéî>>  ¨Âîáíå
>> end

At the risk of someone saying that I've made it too cryptic, it could
be one line shorter:

   Nothing  bject.new
   def name(value  othing)
     @name  alue unless value Nothing
   end


David

-- 
David A. Black / Ruby Power and Light, LLC
Ruby/Rails consulting & training: http://www.rubypal.com
Now available: The Well-Grounded Rubyist (http://manning.com/black2)
"Ruby 1.9: What You Need To Know" Envycasts with David A. Black
http://www.envycasts.com
--1926193751-1293460271-1246198701954--
--1926193751-1293460271-1246198701954--