2008年6月11日 星期三

included & extend

included:
the method defines the action to do when the class or module get included 

extend:
extend the class's ability by including module
ex:
module M
end
Class C
end
c= C.new
c.extend(M)

note:  use object to extend, get instance method, 
           use class to extend, get class method

沒有留言: