Re: [問題] 相同的instance和class method

看板Ruby作者 (那很好哇)時間15年前 (2010/05/13 00:53), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串4/4 (看更多)
應該使用module module Abc def methoda ..... end end class Xxxxx include Abc extend Abc end 這樣Xxxxx.methoda和Xxxxx.new.methoda 基本上就是等效了 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 114.32.77.117
文章代碼(AID): #1BwjqZRn (Ruby)
文章代碼(AID): #1BwjqZRn (Ruby)