lib/active_model/serializer/associations.rb
# Add reflection and define {name} accessor.
# @param [Array<Symbol>]
# @yield [Symbol] return reflection
#
# @api private
#
Add reflection and define {name} accessor.
Add reflection and define { name } accessor .
def associate(attrs)
          options = attrs.extract_options!
          self._reflections = _reflections.dup
          attrs.each do |name|
            unless method_defined?(name)
              define_method name do
                object.send name
              end
            end
            self._reflections << yield(name, options)
          end
        end
def associate ( attrs ) options = attrs . extract_options! self . _reflections = _reflections . dup attrs . each do | name | unless method_defined? ( name ) define_method name do object . send name end end self . _reflections << yield ( name , options ) end end
Add reflection and define {name} accessor.
Add reflection and define { name } accessor .
attrs
<not_specific>
<not_specific>
None
]
<not_specific>
None
api
None