Class: Factory::Attribute::Association
- Inherits:
-
Factory::Attribute
- Object
- Factory::Attribute
- Factory::Attribute::Association
- Defined in:
- lib/factory_girl/attribute/association.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#factory ⇒ Object
readonly
Returns the value of attribute factory.
Attributes inherited from Factory::Attribute
Instance Method Summary collapse
- #add_to(proxy) ⇒ Object
-
#initialize(name, factory, overrides) ⇒ Association
constructor
A new instance of Association.
Constructor Details
#initialize(name, factory, overrides) ⇒ Association
Returns a new instance of Association.
8 9 10 11 12 |
# File 'lib/factory_girl/attribute/association.rb', line 8 def initialize(name, factory, overrides) super(name) @factory = factory @overrides = overrides end |
Instance Attribute Details
#factory ⇒ Object (readonly)
Returns the value of attribute factory.
6 7 8 |
# File 'lib/factory_girl/attribute/association.rb', line 6 def factory @factory end |
Instance Method Details
#add_to(proxy) ⇒ Object
14 15 16 |
# File 'lib/factory_girl/attribute/association.rb', line 14 def add_to(proxy) proxy.associate(name, @factory, @overrides) end |