FYI, it's called the splat operator.  Knowing that should make all the
difference when it comes to looking up information about it.

On Sat, Feb 26, 2011 at 10:04 AM, misham <[email protected]> wrote:

> I'm looking at the code at http://flori.github.com/json/  and the
> example given is:
>
> class Range
>  def to_json(*a)
>    {
>      'json_class'   => self.class.name,
>      'data'         => [ first, last, exclude_end? ]
>    }.to_json(*a)
>  end
>
>  def self.json_create(o)
>    new(*o['data'])
>  end
> end
>
>
> What does *a mean in the to_json function parameter list?
>
> --
> SD Ruby mailing list
> [email protected]
> http://groups.google.com/group/sdruby
>

-- 
SD Ruby mailing list
[email protected]
http://groups.google.com/group/sdruby

Reply via email to