Class: CarrierWave::Storage::GcloudOptions

Inherits:
Object
  • Object
show all
Defined in:
lib/carrierwave/storage/gcloud_options.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(uploader) ⇒ GcloudOptions

Returns a new instance of GcloudOptions.



6
7
8
# File 'lib/carrierwave/storage/gcloud_options.rb', line 6

def initialize(uploader)
  @uploader = uploader
end

Instance Attribute Details

#uploaderObject (readonly)

Returns the value of attribute uploader.



4
5
6
# File 'lib/carrierwave/storage/gcloud_options.rb', line 4

def uploader
  @uploader
end

Instance Method Details

#expiration_options(options = {}) ⇒ Object



14
15
16
17
# File 'lib/carrierwave/storage/gcloud_options.rb', line 14

def expiration_options(options = {})
  uploader_expiration = uploader.gcloud_authenticated_url_expiration
  { expires_in: uploader_expiration }.merge(options)
end

#read_optionsObject



10
11
12
# File 'lib/carrierwave/storage/gcloud_options.rb', line 10

def read_options
  gcloud_read_options
end