class FactoryGirl::Declaration::Implicit
@api private
Attributes
factory[R]
Public Class Methods
new(name, factory = nil, ignored = false)
click to toggle source
Calls superclass method
FactoryGirl::Declaration::new
# File lib/factory_girl/declaration/implicit.rb, line 5 def initialize(name, factory = nil, ignored = false) super(name, ignored) @factory = factory end
Public Instance Methods
==(other)
click to toggle source
# File lib/factory_girl/declaration/implicit.rb, line 10 def ==(other) name == other.name && factory == other.factory && ignored == other.ignored end
Private Instance Methods
build()
click to toggle source
# File lib/factory_girl/declaration/implicit.rb, line 21 def build if FactoryGirl.factories.registered?(name) [Attribute::Association.new(name, name, {})] elsif FactoryGirl.sequences.registered?(name) [Attribute::Sequence.new(name, name, @ignored)] else @factory.inherit_traits([name]) [] end end