Sha256: a759a1f28693e2d0087dee660fd4771b45461710093796e74fb78c1262d5f4a6
Contents?: true
Size: 568 Bytes
Versions: 1
Compression:
Stored size: 568 Bytes
Contents
module FactoryGirl class Declaration class Implicit < Declaration def initialize(name, factory = nil) super(name) @factory = factory end private def build if FactoryGirl.factories.registered?(name) [Attribute::Association.new(name, name, {})] elsif FactoryGirl.sequences.registered?(name) [Attribute::Sequence.new(name, name)] else trait_root = @factory || FactoryGirl trait_root.trait_by_name(name).attributes.to_a end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
factory_girl-2.1.2 | lib/factory_girl/declaration/implicit.rb |