On 2005-01-24, Trans <transfire / gmail.com> wrote:
>>> . def a?
>>> .    @a ? true : @a
>>> . end
>
>> Why not "def a?() @a end"?
>
> Becasue that would be the exact same as 'attr :a'. What would be the
> point? This guaruntees only three possible return values: true, false,
> and nil.

That's right, but what's the use of such a method? Could you show me a
situation when one would intend to restrict a query to have only
true/false/nil as a result? Upon testing, true and the (not nil, false)
object nil, object itself does to same, so what's the point then?

Csaba