Class: Git::Approvals::UglifierFormatter
- Inherits:
-
Tilt::Template
- Object
- Tilt::Template
- Git::Approvals::UglifierFormatter
- Defined in:
- lib/git/approvals/uglifier_formatter.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.engine_initialized? ⇒ Boolean
7 8 9 |
# File 'lib/git/approvals/uglifier_formatter.rb', line 7 def self.engine_initialized? defined?(::Uglifier) end |
Instance Method Details
#evaluate(context, locals, &block) ⇒ Object
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/git/approvals/uglifier_formatter.rb', line 18 def evaluate( context, locals, &block ) # TODO use locals as options to the formatter ::Uglifier.compile context, :output => { :beautify => true, :indent_level => 2, :comments => :all, :space_colon => true } end |
#initialize_engine ⇒ Object
11 12 13 |
# File 'lib/git/approvals/uglifier_formatter.rb', line 11 def initialize_engine require_template_library 'uglifier' end |
#prepare ⇒ Object
15 16 |
# File 'lib/git/approvals/uglifier_formatter.rb', line 15 def prepare end |