Module: Cloudinary::CarrierWave::ClassMethods

Defined in:
lib/cloudinary/carrier_wave/process.rb

Instance Method Summary collapse

Instance Method Details

#cloudinary_transformation(options) ⇒ Object



44
45
46
# File 'lib/cloudinary/carrier_wave/process.rb', line 44

def cloudinary_transformation(options)
  process :cloudinary_transformation => options
end

#convert(format) ⇒ Object



16
17
18
# File 'lib/cloudinary/carrier_wave/process.rb', line 16

def convert(format)
  process :convert => format
end

#crop(width, height, gravity = "Center") ⇒ Object



40
41
42
# File 'lib/cloudinary/carrier_wave/process.rb', line 40

def crop(width, height, gravity="Center")
  process :crop => [width, height, gravity]
end

#eagerObject



12
13
14
# File 'lib/cloudinary/carrier_wave/process.rb', line 12

def eager
  process :eager => true
end

#make_privateObject



3
4
5
# File 'lib/cloudinary/carrier_wave/process.rb', line 3

def make_private
  self.storage_type = :private
end

#process_all_versions(*args) ⇒ Object



7
8
9
10
# File 'lib/cloudinary/carrier_wave/process.rb', line 7

def process_all_versions(*args)
  @all_versions ||= Class.new(self)
  @all_versions.process(*args)
end

#resize_and_pad(width, height, background = :transparent, gravity = "Center") ⇒ Object



32
33
34
# File 'lib/cloudinary/carrier_wave/process.rb', line 32

def resize_and_pad(width, height, background=:transparent, gravity="Center")
  process :resize_and_pad => [width, height, background, gravity]
end

#resize_to_fill(width, height, gravity = "Center") ⇒ Object



28
29
30
# File 'lib/cloudinary/carrier_wave/process.rb', line 28

def resize_to_fill(width, height, gravity="Center")
  process :resize_to_fill => [width, height, gravity]
end

#resize_to_fit(width, height) ⇒ Object



24
25
26
# File 'lib/cloudinary/carrier_wave/process.rb', line 24

def resize_to_fit(width, height)
  process :resize_to_fit => [width, height]
end

#resize_to_limit(width, height) ⇒ Object



20
21
22
# File 'lib/cloudinary/carrier_wave/process.rb', line 20

def resize_to_limit(width, height)
  process :resize_to_limit => [width, height]
end

#scale(width, height) ⇒ Object



36
37
38
# File 'lib/cloudinary/carrier_wave/process.rb', line 36

def scale(width, height)
  process :scale => [width, height]
end

#tags(*tags) ⇒ Object



48
49
50
# File 'lib/cloudinary/carrier_wave/process.rb', line 48

def tags(*tags)
  process :tags=>tags
end