Sha256: 09ceddb28abf5533f661e6c2613c5f045233ba78a729766fc11839cc09749e06
Contents?: true
Size: 733 Bytes
Versions: 151
Compression:
Stored size: 733 Bytes
Contents
module FactoryGirl class Declaration class Implicit < Declaration def initialize(name, factory = nil, ignored = false) super(name, ignored) @factory = factory end def ==(other) name == other.name && factory == other.factory && ignored == other.ignored end protected attr_reader :factory private 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 end end end
Version data entries
151 entries across 96 versions & 7 rubygems