ruby on rails(Ruby 元编程) 动态定义实例变量使用instance_variable_set方法# obj.instance_variable_set(symbol, obj)    -> obj # obj.instance_variable_set(string, obj)    -> obj class Fred  def initialize(p1, p2)    @a, ...

Vicw.com用户头像 - XanderCheung XanderCheung 7786 0 0