Displaying 1 result from an estimated 1 matches for "parm4".
Did you mean:
parms
2006 Aug 10
1
Passing parameters defined in a function or something
Hi,
I have method I want to call ... it can receive * number of parameters.
I also have 3 parms that I want to pass often, so I have defined them in
a separate function:
def my_params
{ :parm1 => 1, :parm2 => 2, :parm3 => 3 }
end
And I want to call my method like this:
mymethod :parm4 => 4, my_params
Now - this doesn''t work - as my_params is a hash of params, which isn''t
the same as calling
mymethod :parm4, :parm1 => 1, :parm2 => 2, :parm3 => 3
Pretty basic - yet fundamental. How do I solve this?
Thanks
Joerg
--
Posted via http://www.ruby-fo...