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.5.1 lib/scrivito/future_binary.rb
scrivito_sdk-1.5.1.rc2 lib/scrivito/future_binary.rb
scrivito_sdk-1.5.1.rc1 lib/scrivito/future_binary.rb
scrivito_sdk-1.5.0 lib/scrivito/future_binary.rb
scrivito_sdk-1.5.0.rc2 lib/scrivito/future_binary.rb
scrivito_sdk-1.5.0.rc1 lib/scrivito/future_binary.rb
scrivito_sdk-1.4.2 lib/scrivito/future_binary.rb
scrivito_sdk-1.4.1 lib/scrivito/future_binary.rb
scrivito_sdk-1.4.1.rc1 lib/scrivito/future_binary.rb
scrivito_sdk-1.4.0 lib/scrivito/future_binary.rb
scrivito_sdk-1.4.0.rc2 lib/scrivito/future_binary.rb
scrivito_sdk-1.4.0.rc1 lib/scrivito/future_binary.rb
scrivito_sdk-1.3.1 lib/scrivito/future_binary.rb
scrivito_sdk-1.3.1.rc1 lib/scrivito/future_binary.rb
scrivito_sdk-1.3.0 lib/scrivito/future_binary.rb
scrivito_sdk-1.3.0.rc3 lib/scrivito/future_binary.rb
scrivito_sdk-1.3.0.rc2 lib/scrivito/future_binary.rb
scrivito_sdk-1.3.0.rc1 lib/scrivito/future_binary.rb
scrivito_sdk-1.2.0 lib/scrivito/future_binary.rb
scrivito_sdk-1.2.0.rc3 lib/scrivito/future_binary.rb