Module: Dizby::PolymorphicDelegated::ClassMethods

Includes:
ClassicAttributeAccess
Defined in:
lib/dizby/utility/polymorphic_delegated.rb

Instance Method Summary collapse

Methods included from ClassicAttributeAccess

#attr_accessor, #attr_reader, #attr_writer

Instance Method Details

#__delegated_methods__


29
30
31
# File 'lib/dizby/utility/polymorphic_delegated.rb', line 29

def __delegated_methods__
  instance_variable_get(:@__delegated_methods__)
end

#method_added(name)


33
34
35
36
37
38
# File 'lib/dizby/utility/polymorphic_delegated.rb', line 33

def method_added(name)
  return if %i(method_missing initialize).include?(name)
  @__delegated_methods__[name] = instance_method(name)
  __send__(:undef_method, name)
  nil
end