Module: IncludeWithRespect::ModuleWithRespect
- Included in:
- ActiveRecord::Base
- Defined in:
- lib/include_with_respect/module_with_respect.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/include_with_respect/module_with_respect.rb', line 20 def self.included(base) # Rename standard include to include_without_respect base.define_singleton_method(:include_without_respect, base.method(:include)) # Rename standard extend to extend_without_respect base.define_singleton_method(:extend_without_respect, base.method(:extend)) base.extend(ClassMethods) end |