On Tue, 26 Nov 2002, Tim Bates wrote:

[snip]
T> if object.property
T> 	object.property.method
T> else
T> 	default_value
T> end
[snip]

how about

  object.property and object.property.method or default_value

you could do something like

  object.property.method rescue default_value

but this does not catch NameError, unless someone else knows the syntax for
this?

-a

-- 

 ====================================
 | Ara Howard
 | NOAA Forecast Systems Laboratory
 | Information and Technology Services
 | Data Systems Group
 | R/FST 325 Broadway
 | Boulder, CO 80305-3328
 | Email: ahoward / fsl.noaa.gov
 | Phone:  303-497-7238
 | Fax:    303-497-7259
 ====================================