I want to pass the contents of an array to a method, to be interpreted
as a standard list of arguments. What’s the simplest and nicest way of
doing this? (i can think of a few dirty hack ways but don’t want to use
them)
thanks a lot, everyone. I’ve used the splat before at the end of
parameter lists, eg
def a_method(a_thing, *args)
But i guess i didn’t really properly understand what it does. I can’t
find an explaanation in pickaxe, although it’s not the simplest thing to
look for in the index (there’s no listing for ‘splat’ and a lot of
listings for ‘*’).
But i guess i didn’t really properly understand what it does. I can’t
find an explaanation in pickaxe, although it’s not the simplest thing to
look for in the index (there’s no listing for ‘splat’ and a lot of
listings for ‘*’).
But i guess i didn’t really properly understand what it does. I can’t
find an explaanation in pickaxe, although it’s not the simplest thing to
look for in the index (there’s no listing for ‘splat’ and a lot of
listings for ‘*’).