[Nitro] cookie.rb ?
guillaume pierronnet
guillaume.pierronnet at gmail.com
Tue Nov 15 17:26:46 EST 2005
this is a boolean "and"
this expression is equivalent:
if t
@expires = t.is_a?(Time) ? t.httpdate : t.to_s
end
2005/11/15, akonsu <akonsu at gmail.com>:
> hello,
>
> could someone explain this code found in cookie.rb:
>
> def expires=(t)
> @expires = t && (t.is_a?(Time) ? t.httpdate : t.to_s)
> end
>
> why does it need the "t &&" part?
>
> thanks
> konstantin
>
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general
>
More information about the Nitro-general
mailing list