Class: Tipsy::Compressors::JavascriptCompressor

Inherits:
Object
  • Object
show all
Defined in:
lib/tipsy/compressors/javascript_compressor.rb

Instance Method Summary collapse

Constructor Details

#initializeJavascriptCompressor

Returns a new instance of JavascriptCompressor.



34
35
36
37
38
39
40
41
42
# File 'lib/tipsy/compressors/javascript_compressor.rb', line 34

def initialize
  begin 
    require 'uglifier'
    self.class.send(:include, Uglifier)
  rescue LoadError
    Tipsy.logger.info("Add the Uglifier gem to your gemfile for better javascript support")
    self.class.send(:include, Closure)
  end
end