| Tim "Fester" Baga ( @ 2008-04-11 22:59:00 |
Ай хорошо.
Разработчики merb жгут словом и делом:
quacks_like?(duck)
Parameters
duck<symbol, class,="Class," array="Array">: The thing to compare the object to.
Notes
The behavior of the method depends on the type of duck as follows:
Symbol: Check whether the object respond_to?(duck).
Class: Check whether the object is_a?(duck).
Array: Check whether the object quacks_like? at least one of the options in the array.
Returns
Boolean: True if the object quacks like duck.
Разработчики merb жгут словом и делом:
quacks_like?(duck)
Parameters
duck<symbol, class,="Class," array="Array">: The thing to compare the object to.
Notes
The behavior of the method depends on the type of duck as follows:
Symbol: Check whether the object respond_to?(duck).
Class: Check whether the object is_a?(duck).
Array: Check whether the object quacks_like? at least one of the options in the array.
Returns
Boolean: True if the object quacks like duck.