Module: Imbue
- Included in:
- Module
- Defined in:
- lib/imbue.rb
Instance Method Summary collapse
Instance Method Details
#imbue(m) ⇒ Object
2 3 4 5 6 7 8 9 10 |
# File 'lib/imbue.rb', line 2 def imbue m include m # now that self includes m, find classes that previously # included self and include it again, so as to cause them # to also include m ObjectSpace.each_object(Class) do |k| k.send :include, self if k.include? self end end |