I have the following code:
for attribute in site.device_attributes device.attribute end
where I would like the code to substitute the value o
The "send" method should do what you're looking for:
object = "upcase me!" method = "upcase" object.send(method.to_sym) # => "UPCASE ME!"