Something else!
class Person attr_accessor :pet end class Pet def make_noise "Woof! Woof!" end end var_name = "pet" p = Person.new p.pet = Pet.new (p.send "#{var_name}").make_noise
So what happens here:
p.send "some_method" calls p.some_method , and the surrounding circle makes the chain possible, i.e. calls p.pet.make_noise at the end. I hope I get it.
source share