如果我有如下变量,
i = 1 k1 = 20
有什么方法可以通过 i 的插值获得 k1 的值吗?
就像是,
k"#{i}" => 20
提前致谢。
ruby variables interpolation
interpolation ×1
ruby ×1
variables ×1