Sha256: 20007a88329e34d6655b8323065639020879af6c34f8e327b86f9fe08a9464c8
Contents?: true
Size: 792 Bytes
Versions: 1
Compression:
Stored size: 792 Bytes
Contents
module Skim Template = Temple::Templates::Tilt(Skim::Engine, :register_as => :skim) class Template def coffee_script_src engine = self.class.build_engine({ :streaming => false, # Overwrite option: No streaming support in Tilt :file => eval_file, :indent => 2 }, options) <<SRC #{self.class.skim_src unless engine.options[:use_asset]} return (context = {}) -> Skim.withContext.call {}, context, -> #{engine.call(data)} SRC end def prepare @src = CoffeeScript.compile(coffee_script_src) end def evaluate(scope, locals, &block) precompiled_template end def self.skim_src @@skim_src ||= File.read(File.expand_path("../../../vendor/assets/javascripts/skim.js.coffee", __FILE__)) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
skim-0.8.3 | lib/skim/template.rb |