另外attr_bitmap还是标准的方法啊……为什么不支持多参数挤在一起呢
def attr_bitmap(sym, width, height)
然后不用eval
可以用
s = Sprite.new
s.bitmap = ......
self.instance_variable_set :"@#{sym}", s
我的言论只代表我个人的观点,不代表雇主及/或任何第三方的立场。
Opinions expressed are solely my own and do not express the views or opinions of my employer and/or any third parties. 捐赠 | GitHub