activesupport/lib/active_support/core_ext/class/delegating_attributes.rb
# Take the object being set and store it in a method. This gives us automatic
# inheritance behavior, without having to store the object in an instance
# variable and look up the superclass chain manually.
Take the object being set and store it in a method. This gives us automatic
inheritance behavior, without having to store the object in an instance
variable and look up the superclass chain manually.
Take the object being set and store it in a method . This gives us automatic inheritance behavior without having to store the object in an instance variable and look up the superclass chain manually .
def _stash_object_in_method(object, method, instance_reader = true)
      singleton_class.remove_possible_method(method)
      singleton_class.send(:define_method, method) { object }
      remove_possible_method(method)
      define_method(method) { object } if instance_reader
    end
def _stash_object_in_method ( object , method , instance_reader = true ) singleton_class . remove_possible_method ( method ) singleton_class . send ( :define_method , method ) { object } remove_possible_method ( method ) define_method ( method ) { object } if instance_reader end
Take the object being set and store it in a method.
Take the object being set and store it in a method .
object
<not_specific>
method
<not_specific>
instance_reader
<not_specific>