Module: Concurrent::ReInclude
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Extended In:
| |
Defined in: | lib/concurrent-ruby/concurrent/re_include.rb |
Overview
Methods form module A included to a module B, which is already included into class C, will not be visible in the C class. If this module is extended to B then A’s methods are correctly made visible to C.
Instance Method Summary
- #extended(base) private
- #include(*modules) private
- #included(base) private
Instance Method Details
#extended(base) (private)
[ GitHub ]# File 'lib/concurrent-ruby/concurrent/re_include.rb', line 44
def extended(base) (@re_include_to_bases ||= []) << [:extend, base] super(base) end
#include(*modules) (private)
[ GitHub ]# File 'lib/concurrent-ruby/concurrent/re_include.rb', line 50
def include(*modules) result = super(*modules) modules.reverse.each do |module_being_included| (@re_include_to_bases ||= []).each do |method, mod| mod.send method, module_being_included end end result end
#included(base) (private)
[ GitHub ]# File 'lib/concurrent-ruby/concurrent/re_include.rb', line 38
def included(base) (@re_include_to_bases ||= []) << [:include, base] super(base) end