From: "Iñaki Baz Castillo" Date: 2008-07-14T05:16:07+09:00 Subject: Re: Passing arguments to a class, how do? El Domingo, 13 de Julio de 2008, Luiz Vitor Martinez Cardoso escribió: > I'm learning Ruby, and i need to solve a problem: > > > class Person > def namer=(name, surname) > @var = name > @car = surname > end > end > > object = Person.new > object.namer = (how to pass the params here) ? I don't know why but it's not possible to define an instance method sufixed with "=" and requiring more than one parameter, it gives an error when passing parameters: irb> object.namer=("NAME","SURNAME") SyntaxError: compile error (irb):34: syntax error, unexpected ',', expecting ')' But you can use "send": irb> object.send("namer=","NAME","SURNAME") -- Iñaki Baz Castillo