摘要: 这个功能要模拟Groovy中Expando和Javascript中的{},这里要用到ruby自带的osstruct库#!C:/Ruby192/bin/ruby.exerequire 'ostruct'def mytest puts "a method"end o = OpenStruct.newo.method1 = mytesto.prop1 = "a property"puts o.method1puts o.prop1 阅读全文
posted @ 2012-12-18 06:15 卜海清 阅读(423) 评论(0) 推荐(0)