Class: FactoryGirl::Attribute::Association Private
- Inherits:
-
FactoryGirl::Attribute
- Object
- FactoryGirl::Attribute
- FactoryGirl::Attribute::Association
- Defined in:
- lib/factory_girl/attribute/association.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Attribute Summary (collapse)
- - (Object) factory readonly private
Attributes inherited from FactoryGirl::Attribute
Instance Method Summary (collapse)
- - (Boolean) association? private
-
- (Association) initialize(name, factory, overrides)
constructor
private
A new instance of Association.
- - (Object) to_proc private
Methods inherited from FactoryGirl::Attribute
Constructor Details
- (Association) initialize(name, factory, overrides)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
A new instance of Association
7 8 9 10 11 |
# File 'lib/factory_girl/attribute/association.rb', line 7 def initialize(name, factory, overrides) super(name, false) @factory = factory @overrides = overrides end |
Instance Attribute Details
- (Object) factory (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
5 6 7 |
# File 'lib/factory_girl/attribute/association.rb', line 5 def factory @factory end |
Instance Method Details
- (Boolean) association?
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
19 20 21 |
# File 'lib/factory_girl/attribute/association.rb', line 19 def association? true end |
- (Object) to_proc
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
13 14 15 16 17 |
# File 'lib/factory_girl/attribute/association.rb', line 13 def to_proc factory = @factory overrides = @overrides -> { association(factory, overrides) } end |