Module: Malt::Tilted::Tilt

Extended by:
Kernel
Defined in:
lib/malt/tilted.rb

Defined Under Namespace

Classes: BlueClothTemplate, BuilderTemplate, CoffeeScriptTemplate, CreoleTemplate, ERBTemplate, ErectorTemplate, ErubisTemplate, HAMLTemplate, KramdownTemplate, LessTemplate, LiquidTemplate, MarkabyTemplate, MarukuTemplate, NokogiriTemplate, RDiscountTemplate, RDocTemplate, RadiusTemplate, RedClothTemplate, RedcarpetTemplate, SassTemplate, ScssTemplate, StringTemplate, WikiClothTemplate

Class Method Summary collapse

Class Method Details

.new(file, options = {}) ⇒ Object


47
48
49
50
51
52
# File 'lib/malt/tilted.rb', line 47

def self.new(file, options={})
  ext = ext_to_type(File.extname(file))
  malt_engine = Malt::Engine.defaults[ext] || Malt::Engine.registry[ext].first
  tilt_engine = Malted.engine_index[malt_engine]
  tilt_engine.new(file, options)
end