class Haml::HTML
def initialize(template, options = {})
which can either be a string containing HTML or an Hpricot node,
Creates a new instance of Haml::HTML that will compile the given template,
def initialize(template, options = {}) @@options = options if template.is_a? Hpricot::Node @template = template else if template.is_a? IO template = template.read end if @@options[:rhtml] match_to_html(template, /<%=(.*?)-?%>/m, 'loud') match_to_html(template, /<%(.*?)-?%>/m, 'silent') end method = @@options[:xhtml] ? Hpricot.method(:XML) : method(:Hpricot) @template = method.call(template) end end