Permalink
Browse files

Add empty #prepended method

Developer can implement that method and put the logic in method
  • Loading branch information...
1 parent eb0b369 commit 59d078080a7e11cb3137cd52c5199f7400cd0e52 @LTe LTe committed Aug 21, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 kernel/common/module19.rb
@@ -155,4 +155,10 @@ def public_constant(*names)
raise NameError, "#{unknown_constants.size > 1 ? 'Constants' : 'Constant'} #{unknown_constants.map{|e| "#{name}::#{e}"}.join(', ')} undefined"
end
end
+
+ # Hook method called on Module when another Module is .prepend'd into it.
+ #
+ # Override for module-specific behaviour.
+ #
+ def prepended(mod); end
end

0 comments on commit 59d0780

Please sign in to comment.