def to_proc
      block = @block
      value = @value
      
      lambda do |target, record|
        value = value.call(record) if value.respond_to? :call
        return target.send(setter, value) unless block

        if value.is_a? Enumerable
          values = value.map { |v| instance_exec(v, &block) }
          target.send(setter, values)
        else
          target.send(setter, instance_exec(value, &block))
        end
      end
    end
def to_proc
      block = @block
      value = @value
      
      lambda do |target, record|
        value = value.call(record) if value.respond_to? :call
        return target.send(setter, value) unless block

        if value.is_a? Enumerable
          values = value.map { |v| instance_exec(v, &block) }
          target.send(setter, values)
        else
          target.send(setter, instance_exec(value, &block))
        end
      end
    end
Initializes a declaration with a given name and value. `value` may
 respond to `#call`, which will be called with a record to generate the
 values.

 @param name  [Symbol]
 @param value [#call, Object]
 @param _opts [Hash] A hash of options for for the declaration. default: {}

 @raise ArgumentError  when a block with arity other than 1 is passed

 Returns a proc that can be run to add values for the property to
 Passes value(s) through a block, if given.

 If value is a callable object (e.g. a Proc), calls it with the
 OriginalRecord as an argument to determine the value.

 @return [Proc] a proc that can be used to generate a value for the named
   property.