【发布时间】:2012-05-14 13:05:38
【问题描述】:
我想做的是动态命名变量,例如:
def instance(instance)
@instance = instance #@instance isn't actually a variable called @instance, rather a variable called @whatever was passed as an argument
end
我该怎么做?
【问题讨论】:
标签: ruby variables dynamic naming