G
Gavin Kistner
Just thought I'd point out my surprise that the Module#extend_object
callback only fires when #extend is explicitly called, and not when the
module extends the class via #include:
module Foo
def self.extend_object( o )
p "#{o} just extended by #{self}"
end
end
class Bar; include Foo; end
class Bar2; self.extend( Foo ); end
#=> "Bar2 just extended by Foo"
It'd be nice, IMO, to have it work in both cases.
callback only fires when #extend is explicitly called, and not when the
module extends the class via #include:
module Foo
def self.extend_object( o )
p "#{o} just extended by #{self}"
end
end
class Bar; include Foo; end
class Bar2; self.extend( Foo ); end
#=> "Bar2 just extended by Foo"
It'd be nice, IMO, to have it work in both cases.