Sha256: c73760adcc2996f3b56cb19b00d69ea1d8a398d907c7e2890a1810dd2bf0fb54
Contents?: true
Size: 435 Bytes
Versions: 12
Compression:
Stored size: 435 Bytes
Contents
module FactoryGirl class Attribute #:nodoc: class Dynamic < Attribute #:nodoc: def initialize(name, block) super(name) @block = block end def add_to(proxy) value = @block.arity == 1 ? @block.call(proxy) : proxy.instance_exec(&@block) if FactoryGirl::Sequence === value raise SequenceAbuseError end proxy.set(name, value) end end end end
Version data entries
12 entries across 12 versions & 2 rubygems