Sha256: 89f246f109b4e4ff0cd48cb40533c0338922b70e573be31f685d90ab0d2fcf68
Contents?: true
Size: 443 Bytes
Versions: 3
Compression:
Stored size: 443 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, @ignored) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
factory_girl-2.1.2 | lib/factory_girl/attribute/dynamic.rb |
factory_girl-2.1.0 | lib/factory_girl/attribute/dynamic.rb |
factory_girl-2.0.5 | lib/factory_girl/attribute/dynamic.rb |