Class: FactoryGirl::Declaration::Association Private

Inherits:
FactoryGirl::Declaration show all
Defined in:
lib/factory_girl/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 FactoryGirl::Declaration

#name

Instance Method Summary collapse

Methods inherited from FactoryGirl::Declaration

#to_attributes

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
# File 'lib/factory_girl/declaration/association.rb', line 5

def initialize(name, *options)
  super(name, false)
  @options = options.dup
  @overrides = options.extract_options!
  @traits = options
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.



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

def ==(other)
  name == other.name &&
    options == other.options
end