Re: Good solution for managing stylesheets

Justin Forder
Sat, 20 Aug 2005 03:34:16 -0000

Frank Manno wrote:
>>You sometimes see methods with parameters like that (such as
>>stylesheet_link_tag).  This lets you pass in an unlimited number of
>>params, and the method treats it as one variable.
>
>
> Hey Rick,
>
> Thanks for clearing that up... I think I do remember reading that in
> my Ruby book now that you mentioned it.  What would that be called
> (the use of the asterisk)?  I''m not sure what to search the index
for.

The index has an entry for "* (array argument)" and an entry for
"Variable-length argument list" - both of these refer to information
on
how to declare methods taking arbitrary numbers of arguments. The other
point Rick mentioned - prefixing an actual parameter with * in a method
call - is mentioned in "Invoking a Method" (p348 in the second
edition).
I don''t know what it would be called.

regards

    Justin