Class: FunWith::Gems::CoreExtender
- Inherits:
-
Object
- Object
- FunWith::Gems::CoreExtender
- Defined in:
- lib/fun_with/gems/core_extender.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.extend_core(*args, &block) ⇒ Object
4 5 6 |
# File 'lib/fun_with/gems/core_extender.rb', line 4 def self.extend_core( *args, &block ) self.new.extend_core( *args, &block ) end |
Instance Method Details
#extend_core(gem_const) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/fun_with/gems/core_extender.rb', line 8 def extend_core( gem_const ) return false unless defined?( gem_const::CoreExtensions ) ce = gem_const::CoreExtensions for mod in ce.constants if Object.const_defined?( mod ) original = Object.const_get( mod ) includable = ce.const_get( mod ) include_in_core( original, includable ) end end end |