![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ruby
文章平均质量分 73
yxiangxiao
这个作者很懒,什么都没留下…
展开
-
ruby元编程一点心得
tips1 打开类的使用 class TestReplace def to_replace(s) s.gsub /[^\w\s]/, '' end end '2 the Magic Num'==TestReplace.new.to_replace('#2, the Magic, Num') #=>true 上面用法是我们常用的原创 2013-09-23 17:07:39 · 1086 阅读 · 0 评论 -
ruby程序重构方法
数据库类 class DS def initialize # connect to data source... def get_mouse_info(id) #... def get_mouse_price(id) #... def get_keyboard_info(id) #... def get_keyboard_price(id) #.... #.... ruby调原创 2013-09-25 19:18:06 · 703 阅读 · 0 评论