G
Gaston Garcia
------=_Part_9794_18828428.1125080159842
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Hi everyone:
On the ruby quiz called: Banned Words (#9), I'm looking at the class posted=
=20
there and I came up with something I had never seen before (probably becaus=
e=20
I'm really new to Ruby)
class LanguageFilter
def initialize( *banned_words )
@banned_words =3D banned_words.flatten.sort
@clean_calls =3D 0
end
end
I had never seen this:
def initialize(*banned_words)
what does that * do? Does it mean I can send as many parameters as I want?
Thanks to all.
--=20
-gaston
http://www.hermanobrother.com/blog/
------=_Part_9794_18828428.1125080159842--
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Hi everyone:
On the ruby quiz called: Banned Words (#9), I'm looking at the class posted=
=20
there and I came up with something I had never seen before (probably becaus=
e=20
I'm really new to Ruby)
class LanguageFilter
def initialize( *banned_words )
@banned_words =3D banned_words.flatten.sort
@clean_calls =3D 0
end
end
I had never seen this:
def initialize(*banned_words)
what does that * do? Does it mean I can send as many parameters as I want?
Thanks to all.
--=20
-gaston
http://www.hermanobrother.com/blog/
------=_Part_9794_18828428.1125080159842--