From: Gary Wright Date: 2007-05-10T04:36:39+09:00 Subject: Re: using dynamic method calling with attr_writer methods On May 9, 2007, at 3:23 PM, Markus Hohenhaus wrote: > I'm a total Ruby newbie looking for help. > [...] > @methods.each { |a| test.send(a, 'foo') } > This throws the error: ArgumentError: wrong number of Arguments (1 for > 0) The problem is you are calling the 'getters' with an argument ('foo'). Getters don't take an argument, thus the error message. You want: @methods.each { |a| puts test.send(a) } I added the puts, otherwise you won't get any output. If you want to call the setters, you need to send a different method name: @methods.each { |a| test.send("#{a}=", 'foo') } And of course you need to send an argument also. Gary Wright