class Sprockets::JSMincCompressor

Constants

VERSION

Attributes

cache_key[R]

Public Class Methods

cache_key() click to toggle source
# File lib/sprockets/jsminc_compressor.rb, line 17
def self.cache_key
  instance.cache_key
end
call(input) click to toggle source
# File lib/sprockets/jsminc_compressor.rb, line 13
def self.call(input)
  instance.call(input)
end
instance() click to toggle source
# File lib/sprockets/jsminc_compressor.rb, line 9
def self.instance
  @instance ||= new
end
new(options = {}) click to toggle source
# File lib/sprockets/jsminc_compressor.rb, line 23
def initialize(options = {})
  @compressor_class = Autoload::JSMinC
  @cache_key = "#{self.class.name}:#{Autoload::JSMinC::VERSION}:#{VERSION}:#{DigestUtils.digest(options)}".freeze
end

Public Instance Methods

call(input) click to toggle source
# File lib/sprockets/jsminc_compressor.rb, line 28
def call(input)
  @compressor_class.minify(input[:data])
end