Module: Ckeditor::Backend::CarrierWave::InstanceMethods

Defined in:
lib/ckeditor/backend/carrierwave.rb

Instance Method Summary collapse

Instance Method Details

#extract_sizeObject



40
41
42
# File 'lib/ckeditor/backend/carrierwave.rb', line 40

def extract_size
  model.data_file_size = file.size
end

#magickObject



44
45
46
# File 'lib/ckeditor/backend/carrierwave.rb', line 44

def magick
  @magick ||= ::MiniMagick::Image.new(current_path)
end

#quality(percentage) ⇒ Object

process :quality => 85



32
33
34
35
36
37
38
# File 'lib/ckeditor/backend/carrierwave.rb', line 32

def quality(percentage)
  manipulate! do |img|
    img.quality(percentage)
    img = yield(img) if block_given?
    img
  end
end

#stripObject

process :strip



23
24
25
26
27
28
29
# File 'lib/ckeditor/backend/carrierwave.rb', line 23

def strip
  manipulate! do |img|
    img.strip
    img = yield(img) if block_given?
    img
  end
end