Class: Sprockets::Exporters::ZopfliExporter

Inherits:
ZlibExporter show all
Defined in:
lib/sprockets/exporters/zopfli_exporter.rb

Overview

Generates a ‘.gz` file using the zopfli algorithm from the Zopfli gem.

Instance Attribute Summary

Attributes inherited from Base

#asset, #directory, #environment, #target

Instance Method Summary collapse

Methods inherited from ZlibExporter

#call, #skip?

Methods inherited from Base

#call, #initialize, #skip?, #write

Constructor Details

This class inherits a constructor from Sprockets::Exporters::Base

Instance Method Details

#setupObject



8
9
10
11
# File 'lib/sprockets/exporters/zopfli_exporter.rb', line 8

def setup
  @gzip_target = "#{ target }.gz"
  @gzip = Sprockets::Utils::Gzip.new(asset, archiver: Utils::Gzip::ZopfliArchiver)
end