Class: FactoryGirl::Attribute::Association
- Inherits:
-
FactoryGirl::Attribute
- Object
- FactoryGirl::Attribute
- FactoryGirl::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 FactoryGirl::Attribute
Instance Method Summary collapse
- #add_to(proxy) ⇒ Object
- #association? ⇒ Boolean
-
#initialize(name, factory, overrides) ⇒ Association
constructor
A new instance of Association.
Methods inherited from FactoryGirl::Attribute
#<=>, #aliases_for?, #ignore, #priority
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 Attribute Details
#factory ⇒ Object (readonly)
Returns the value of attribute factory.
4 5 6 |
# File 'lib/factory_girl/attribute/association.rb', line 4 def factory @factory 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 |
#association? ⇒ Boolean
16 17 18 |
# File 'lib/factory_girl/attribute/association.rb', line 16 def association? true end |