Sha256: 87f27a756d37557f7cb111b0cb3982ccb3340c11a295e8197172ac4c80127a5d

Contents?: true

Size: 623 Bytes

Versions: 86

Compression:

Stored size: 623 Bytes

Contents

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

Version data entries

86 entries across 86 versions & 1 rubygems

Version Path
scrivito_sdk-1.18.0 app/cms/scrivito/future_binary.rb
scrivito_sdk-1.18.0.rc1 app/cms/scrivito/future_binary.rb
scrivito_sdk-1.17.0 app/cms/scrivito/future_binary.rb
scrivito_sdk-1.17.0.rc3 app/cms/scrivito/future_binary.rb
scrivito_sdk-1.17.0.rc2 app/cms/scrivito/future_binary.rb
scrivito_sdk-1.17.0.rc1 app/cms/scrivito/future_binary.rb
scrivito_sdk-1.16.0 app/cms/scrivito/future_binary.rb
scrivito_sdk-1.16.0.rc2 app/cms/scrivito/future_binary.rb
scrivito_sdk-1.16.0.rc1 app/cms/scrivito/future_binary.rb
scrivito_sdk-1.15.0 app/cms/scrivito/future_binary.rb
scrivito_sdk-1.15.0.rc2 app/cms/scrivito/future_binary.rb
scrivito_sdk-1.15.0.rc1 app/cms/scrivito/future_binary.rb
scrivito_sdk-1.14.0 app/cms/scrivito/future_binary.rb
scrivito_sdk-1.14.0.rc3 app/cms/scrivito/future_binary.rb
scrivito_sdk-1.14.0.rc2 app/cms/scrivito/future_binary.rb
scrivito_sdk-1.14.0.rc1 app/cms/scrivito/future_binary.rb
scrivito_sdk-1.13.0 app/cms/scrivito/future_binary.rb
scrivito_sdk-1.13.0.rc2 app/cms/scrivito/future_binary.rb
scrivito_sdk-1.13.0.rc1 app/cms/scrivito/future_binary.rb
scrivito_sdk-1.12.0 app/cms/scrivito/future_binary.rb