Class: Jekyll::Images::JpegOptim

Inherits:
Runner
  • Object
show all
Defined in:
lib/jekyll/images/jpeg_optim.rb

Overview

Runs jpegoptim on JPEG files

Constant Summary collapse

BINARY =
'jpegoptim'.freeze

Instance Attribute Summary

Attributes inherited from Runner

#binary, #bytes_after, #bytes_before, #file, #interlaced

Instance Method Summary collapse

Methods inherited from Runner

#exist?, #initialize, mime, register, run, #run, runners

Constructor Details

This class inherits a constructor from Jekyll::Images::Runner

Instance Method Details

#commandObject



11
12
13
# File 'lib/jekyll/images/jpeg_optim.rb', line 11

def command
  [binary, '--strip-all', '--quiet', ('--all-progressive' if interlaced), file].compact
end