Class: Condenser::EjsTemplare
Class Method Summary
collapse
Instance Method Summary
collapse
#binary, #exec_runtime, #exec_runtime_error, #exec_syntax_error, node_modules_path, #node_modules_path
Class Method Details
.call(environment, input) ⇒ Object
11
12
13
|
# File 'lib/condenser/templating_engine/ejs.rb', line 11
def self.call(environment, input)
new.call(environment, input)
end
|
.setup(environment) ⇒ Object
3
4
5
6
7
8
9
|
# File 'lib/condenser/templating_engine/ejs.rb', line 3
def self.setup(environment)
require 'ejs' unless defined?(::EJS)
if !environment.path.include?(EJS::ASSET_DIR)
environment.append_path(EJS::ASSET_DIR)
end
end
|
Instance Method Details
#call(environment, input) ⇒ Object
15
16
17
|
# File 'lib/condenser/templating_engine/ejs.rb', line 15
def call(environment, input)
input[:source] = ::EJS.transform(input[:source], {strict: true})
end
|