Sha256: 82717de09da67390ecfee75e5fa9515e936f8d187485edc0c3d294e0421cf0e3
Contents?: true
Size: 909 Bytes
Versions: 26
Compression:
Stored size: 909 Bytes
Contents
# =========================================================================== # Project: Abbot - SproutCore Build Tools # Copyright: ©2009 Apple Inc. # portions copyright @2006-2011 Strobe Inc. # and contributors # =========================================================================== require 'haml' module SC module RenderEngine class Haml def initialize(html_context) @html_context = html_context end def compile(input) ::Haml::Engine.new(input).send(:precompiled_with_ambles, []) end def concat(string, binding) eval("_hamlout", binding).push_text string end def capture(*args, &block) if @html_context.respond_to?(:is_haml?) && @html_context.is_haml? @html_context.capture_haml(nil, &block) else block.call(*args).to_s end end end end end
Version data entries
26 entries across 26 versions & 1 rubygems