Class: Crush::Uglifier

Inherits:
Engine
  • Object
show all
Defined in:
lib/crush/uglifier.rb

Instance Attribute Summary

Attributes inherited from Engine

#data, #file, #options

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Engine

engine_name, #initialize, #render

Constructor Details

This class inherits a constructor from Crush::Engine

Class Method Details

.engine_initialized?Boolean

Returns:

  • (Boolean)


3
4
5
# File 'lib/crush/uglifier.rb', line 3

def self.engine_initialized?
  !!(defined? ::Uglifier)
end

Instance Method Details

#evaluateObject



15
16
17
# File 'lib/crush/uglifier.rb', line 15

def evaluate
  @engine.compile(data)
end

#initialize_engineObject



7
8
9
# File 'lib/crush/uglifier.rb', line 7

def initialize_engine
  require_template_library "uglifier"
end

#prepareObject



11
12
13
# File 'lib/crush/uglifier.rb', line 11

def prepare
  @engine = ::Uglifier.new(options)
end