Class: DragonflyMozjpeg::Processors::Lossy
- Inherits:
-
Object
- Object
- DragonflyMozjpeg::Processors::Lossy
- Defined in:
- lib/dragonfly_mozjpeg/processors/lossy.rb
Instance Method Summary collapse
Instance Method Details
#call(content, opts = nil) ⇒ Object
6 7 8 9 10 |
# File 'lib/dragonfly_mozjpeg/processors/lossy.rb', line 6 def call(content, opts = nil) content.shell_update ext: 'jpg' do |input, output| "#{content.env[:cjpeg]} #{Utils.(opts)} -outfile #{output} #{input}" end end |
#update_url(url_attributes, format, options = {}) ⇒ Object
12 13 14 |
# File 'lib/dragonfly_mozjpeg/processors/lossy.rb', line 12 def update_url(url_attributes, format, = {}) url_attributes.ext = format.to_s end |