Class: Lotus::Assets::Compressors::Abstract Private

Inherits:
Object
  • Object
show all
Defined in:
lib/lotus/assets/compressors/abstract.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Abstract base class for compressors.

Don't use this class directly, but please use subclasses instead.

Since:

  • 0.1.0

Direct Known Subclasses

Javascript, NullCompressor, Stylesheet

Instance Method Summary collapse

Instance Method Details

#compress(filename) ⇒ String

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Compress the given asset

Parameters:

  • filename (String, Pathname)

    the absolute path to the asset

Returns:

  • (String)

    the compressed asset

Since:

  • 0.1.0


40
41
42
43
44
# File 'lib/lotus/assets/compressors/abstract.rb', line 40

def compress(filename)
  compressor.compress(
    read(filename)
  )
end