Class: Tilt::BabelTemplate

Inherits:
PlainTemplate
  • Object
show all
Defined in:
lib/linner/template.rb

Instance Method Summary collapse

Instance Method Details

#evaluate(scope, locals, &block) ⇒ Object



22
23
24
# File 'lib/linner/template.rb', line 22

def evaluate(scope, locals, &block)
  @output ||= Babel::Transpiler.transform(data, compact: false)["code"]
end

#prepareObject



20
# File 'lib/linner/template.rb', line 20

def prepare; end