Sha256: 9f06c78a79f39b06c8431f44d8f3771559d283744139162501c93af833b12b69
Contents?: true
Size: 449 Bytes
Versions: 93
Compression:
Stored size: 449 Bytes
Contents
module FactoryGirl class Attribute # @api private class Dynamic < Attribute def initialize(name, ignored, block) super(name, ignored) @block = block end def to_proc block = @block -> { value = block.arity == 1 ? block.call(self) : instance_exec(&block) raise SequenceAbuseError if FactoryGirl::Sequence === value value } end end end end
Version data entries
93 entries across 83 versions & 5 rubygems