Class: FactoryBot::Declaration::Association Private
- Inherits:
-
FactoryBot::Declaration
- Object
- FactoryBot::Declaration
- FactoryBot::Declaration::Association
- Defined in:
- lib/factory_bot/declaration/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
Attributes inherited from FactoryBot::Declaration
Instance Method Summary collapse
- #==(other) ⇒ Object private
-
#initialize(name, *options) ⇒ Association
constructor
private
A new instance of Association.
Methods inherited from FactoryBot::Declaration
Constructor Details
#initialize(name, *options) ⇒ 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.
Returns a new instance of Association.
5 6 7 8 9 10 11 |
# File 'lib/factory_bot/declaration/association.rb', line 5 def initialize(name, *) super(name, false) @options = .dup @overrides = . @factory_name = @overrides.delete(:factory) || name @traits = end |
Instance Method Details
#==(other) ⇒ Object
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_bot/declaration/association.rb', line 13 def ==(other) self.class == other.class && name == other.name && == other. end |