Class: Shift::ClosureCompiler

Inherits:
Interface show all
Defined in:
lib/shift/i/closure_compiler.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Interface

available?, default, #initialize, instructions, keep_extension?, new, #rename, require_libs

Constructor Details

This class inherits a constructor from Shift::Interface

Class Method Details

.engine_classObject



10
11
12
# File 'lib/shift/i/closure_compiler.rb', line 10

def self.engine_class
  Closure::Compiler
end

.gem_dependenciesObject



6
7
8
# File 'lib/shift/i/closure_compiler.rb', line 6

def self.gem_dependencies
  %w{closure-compiler}
end

.target_formatObject



14
15
16
# File 'lib/shift/i/closure_compiler.rb', line 14

def self.target_format
  'min.js'
end

Instance Method Details

#process(str) ⇒ Object



18
19
20
# File 'lib/shift/i/closure_compiler.rb', line 18

def process(str)
  @engine.compile(str)
end