Sha256: fec7944d94c826b67ca872463a0bcc3d76199f3313508452d9108bf5f6dd21c0
Contents?: true
Size: 460 Bytes
Versions: 11
Compression:
Stored size: 460 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 ? instance_exec(self, &block) : instance_exec(&block) raise SequenceAbuseError if FactoryGirl::Sequence === value value } end end end end
Version data entries
11 entries across 8 versions & 4 rubygems