Module: Dizby::PolymorphicDelegated

Included in:
TCProtocol::Server, UnixProtocol::Server
Defined in:
lib/dizby/utility/polymorphic_delegated.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Class Method Details

.included(base)


9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/dizby/utility/polymorphic_delegated.rb', line 9

def self.included(base)
  base.extend(ClassMethods)

  base.class_eval do
    intercepted = [base, Object, Kernel, BasicObject]
    intercepted = intercepted.map(&:instance_methods).reduce(&:-)

    intercepted.each do |name|
      __create_delegated_method__(name)
    end
  end
end