Class: Object
- Inherits:
- BasicObject
- Defined in:
- lib/uninclude/block.rb
Instance Method Summary collapse
Instance Method Details
#__extend ⇒ Object
30 |
# File 'lib/uninclude/block.rb', line 30 alias_method :__extend, :extend |
#__unextend ⇒ Object
31 |
# File 'lib/uninclude/block.rb', line 31 alias_method :__unextend, :unextend |
#extend(mod) ⇒ Object
33 34 35 36 37 38 39 40 |
# File 'lib/uninclude/block.rb', line 33 def extend(mod) __extend(mod) if block_given? yield(self) __unextend(mod) end end |
#unextend(mod) ⇒ Object
43 44 45 46 47 48 49 50 51 52 |
# File 'ext/uninclude/uninclude.c', line 43 def unextend(mod) return unless singleton_class.ancestors.include?(mod) __unextend(mod) if block_given? yield(self) __extend(mod) end end |