[Solved] How can I rename methods with metaprogramming?


In this case send with string interpolation seems to be the simplest solution:

(1..5).each do |i|
  @profile.send("picture#{i}=", set_selfies[:profile]["picture#{i}"])
end

0

solved How can I rename methods with metaprogramming?