Sha256: b482061494f2f83e7721a4a7bf17aaa6a685d8cf9d0af836291485608c6dfed2
Contents?: true
Size: 843 Bytes
Versions: 9
Compression:
Stored size: 843 Bytes
Contents
# encoding: utf-8 module Mongoid #:nodoc: module Associations #:nodoc: class MetaData #:nodoc: attr_reader :association, :options delegate :macro, :to => :association # Delegate all methods on +Options+ to the options instance. Associations::Options.public_instance_methods(false).each do |name| define_method(name) { |*args| @options.send(name) } end # Create the new associations MetaData object, which holds the type of # the association and its options, with convenience methods for getting # that information. # # Options: # # association: The association type as a class instance. # options: The association options def initialize(association, options) @association, @options = association, options end end end end
Version data entries
9 entries across 9 versions & 2 rubygems