class SC::RenderEngine::Haml

Public Class Methods

new(html_context) click to toggle source
# File lib/sproutcore/render_engines/haml.rb, line 14
def initialize(html_context)
  @html_context = html_context
end

Public Instance Methods

capture(*args, &block) click to toggle source
# File lib/sproutcore/render_engines/haml.rb, line 26
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
compile(input) click to toggle source
# File lib/sproutcore/render_engines/haml.rb, line 18
def compile(input)
  ::Haml::Engine.new(input).compiler.send(:precompiled_with_ambles, [])
end
concat(string, binding) click to toggle source
# File lib/sproutcore/render_engines/haml.rb, line 22
def concat(string, binding)
  eval("_hamlout", binding).push_text string
end