A
Aaron Smith
How can I exract array values when using Object.send. See the example
below.
class TestSend
def test( arg1, arg2, arg3)
puts arg1
puts arg2
puts arg3
end
end
t = TestSend.new
t.send('test', 'hey', 1, 'rrr')
args = ['hey',1,'rrr']
t.send('test', args) #this throws an argument error, 3 for 1..
Thanks.
below.
class TestSend
def test( arg1, arg2, arg3)
puts arg1
puts arg2
puts arg3
end
end
t = TestSend.new
t.send('test', 'hey', 1, 'rrr')
args = ['hey',1,'rrr']
t.send('test', args) #this throws an argument error, 3 for 1..
Thanks.