Class: Sinatra::JstPages::HamlCoffeeEngine

Inherits:
Engine
  • Object
show all
Defined in:
lib/sinatra/jstpages.rb

Instance Attribute Summary

Attributes inherited from Engine

#file, #name

Instance Method Summary collapse

Methods inherited from Engine

#contents, #initialize, #wrap_jst

Constructor Details

This class inherits a constructor from Sinatra::JstPages::Engine

Instance Method Details

#compile!Object



245
246
247
248
249
# File 'lib/sinatra/jstpages.rb', line 245

def compile!
  HamlCoffeeAssets.config.context = false
  HamlCoffeeAssets::Compiler.compile(name, contents, true).
    match(/^  window.JST(.*)\n  };$/m)[0].gsub(/^  window.JST/, 'JST')
end