module Scrivito # # @api public # # The FutureBinary class represents the data to be stored in a binary field. # See {Scrivito::Binary.upload} and {Scrivito::Binary#copy} for details. # # @see Scrivito::Binary.upload # @see Scrivito::Binary#copy # class FutureBinary attr_reader :filename, :content_type, :id_to_copy, :file_to_upload def initialize(options = {}) @filename, @content_type, @id_to_copy, @file_to_upload = options.values_at(:filename, :content_type, :id_to_copy, :file_to_upload) end def to_h { filename: filename, content_type: content_type, }.compact end end end