class ReeDao::Associations
def initialize(agg_caller, list, local_vars, autoload_children = false, **opts)
def initialize(agg_caller, list, local_vars, autoload_children = false, **opts) @agg_caller = agg_caller @list = list @local_vars = local_vars @global_opts = opts || {} @only = opts[:only] if opts[:only] @except = opts[:except] if opts[:except] @autoload_children = autoload_children raise ArgumentError.new("you can't use both :only and :except arguments at the same time") if @only && @except if !self.class.sync_mode? @assoc_threads = [] @field_threads = [] end local_vars.each do |k, v| instance_variable_set(k, v) self.class.define_method k.to_s.gsub('@', '') do v end end end