Class: Factory::Attribute::Association

Inherits:
Factory::Attribute show all
Defined in:
lib/factory_girl/attribute/association.rb

Overview

:nodoc:

Instance Attribute Summary

Attributes inherited from Factory::Attribute

#name

Instance Method Summary collapse

Constructor Details

#initialize(name, factory, overrides) ⇒ Association

Returns a new instance of Association.



6
7
8
9
10
# File 'lib/factory_girl/attribute/association.rb', line 6

def initialize(name, factory, overrides)
  super(name)
  @factory   = factory
  @overrides = overrides
end

Instance Method Details

#add_to(proxy) ⇒ Object



12
13
14
# File 'lib/factory_girl/attribute/association.rb', line 12

def add_to(proxy)
  proxy.associate(name, @factory, @overrides)
end