Sha256: 5acf7100f5b7698c4c132a96d386755499114b471e06e027a1b7350b94147e73
Contents?: true
Size: 453 Bytes
Versions: 94
Compression:
Stored size: 453 Bytes
Contents
module FactoryGirl class Attribute #:nodoc: class Dynamic < Attribute #:nodoc: def initialize(name, ignored, block) super(name, ignored) @block = block end def to_proc block = @block lambda { value = block.arity == 1 ? block.call(self) : instance_exec(&block) raise SequenceAbuseError if FactoryGirl::Sequence === value value } end end end end
Version data entries
94 entries across 85 versions & 5 rubygems