Sha256: 7be8fbd64fc45c47f98ad1e4a713b809c47319cfecaaafe19871a8166559dd8b
Contents?: true
Size: 533 Bytes
Versions: 13
Compression:
Stored size: 533 Bytes
Contents
module FactoryBot class Attribute # @api private class Dynamic < Attribute def initialize(name, ignored, block) super(name, ignored) @block = block end def to_proc block = @block -> { value = case block.arity when 1, -1 then instance_exec(self, &block) else instance_exec(&block) end raise SequenceAbuseError if FactoryBot::Sequence === value value } end end end end
Version data entries
13 entries across 13 versions & 1 rubygems