Module: Pug::CompilationEssentials
- Included in:
- ShippedCompiler, SystemCompiler
- Defined in:
- lib/pug-ruby/compilation-essentials.rb
Overview
Used to share common things between compilers.
Instance Method Summary collapse
-
#process_result(source, result, options) ⇒ String
Responds for post-processing compilation result.
Instance Method Details
#process_result(source, result, options) ⇒ String
Responds for post-processing compilation result.
16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/pug-ruby/compilation-essentials.rb', line 16 def process_result(source, result, ) if [:client] if [:inline_runtime_functions] "(function() { #{ super }; return #{ [:name] }; }).call(this);" else pug = "typeof pugRuntime === 'object' && pugRuntime !== null ? pugRuntime : pug" "(function(pug) { #{ super }; return #{ [:name] }; }).call(this, #{ pug });" end else super end end |