Class: Crush::Uglifier
- Inherits:
-
Engine
- Object
- Tilt::Template
- Engine
- Crush::Uglifier
show all
- Defined in:
- lib/crush/uglifier.rb
Overview
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Engine
compile, compress, #compress, #initialize, #render
Constructor Details
This class inherits a constructor from Crush::Engine
Class Method Details
.engine_initialized? ⇒ Boolean
11
12
13
|
# File 'lib/crush/uglifier.rb', line 11
def self.engine_initialized?
!!(defined? ::Uglifier)
end
|
Instance Method Details
#evaluate(scope, locals, &block) ⇒ Object
24
25
26
|
# File 'lib/crush/uglifier.rb', line 24
def evaluate(scope, locals, &block)
@output ||= @engine.compile(data)
end
|
#initialize_engine ⇒ Object
15
16
17
|
# File 'lib/crush/uglifier.rb', line 15
def initialize_engine
require_template_library "uglifier"
end
|
#prepare ⇒ Object
19
20
21
22
|
# File 'lib/crush/uglifier.rb', line 19
def prepare
@engine = ::Uglifier.new(options)
@output = nil
end
|