Class: DragonflyMozjpeg::Plugin

Inherits:
Object
  • Object
show all
Defined in:
lib/dragonfly_mozjpeg/plugin.rb

Instance Method Summary collapse

Instance Method Details

#call(app, options = {}) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/dragonfly_mozjpeg/plugin.rb', line 8

def call(app, options = {})
  app.env[:cjpeg]    = Utils.check_binary(options[:cjpeg],    'cjpeg')
  app.env[:jpegtran] = Utils.check_binary(options[:jpegtran], 'jpegtran')

  app.add_processor :lossy,    Processors::Lossy.new
  app.add_processor :lossless, Processors::Lossless.new
end