Sha256: 8520c3a264145261a593d6acba6c0afd72198024f2cdd725cb0be338dd2ec0cf
Contents?: true
Size: 502 Bytes
Versions: 2
Compression:
Stored size: 502 Bytes
Contents
require "haml-sprockets/version" require 'tilt' module Haml module Sprockets class Template < ::Tilt::Template def self.engine_initialized? true end def initialize_engine end def prepare end def evaluate(scope,locals,&block) haml_code = data.dup haml_code = haml_code.gsub(/\\/,"\\\\").gsub(/\'/,"\\'").gsub(/\n/,"\\n") "Haml('#{haml_code}')" end end end end require "haml-sprockets/engine" if defined?(Rails)
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
haml-sprockets-0.0.2 | lib/haml-sprockets.rb |
haml-sprockets-0.0.1 | lib/haml-sprockets.rb |