class Object
Public Instance Methods
# File htree/template.rb, line 390 def HTree(html_string=nil, &block) if block_given? raise ArgumentError, "both argument and block given." if html_string template = block.call HTree.parse(HTree::TemplateCompiler.new.expand_template(template, '', HTree::Encoder.internal_charset, block.binding)) else HTree.parse(html_string) end end
HTree(<i>html_string</i>) parses html_string. HTree{<i>template_string</i>} parses template_string and expand it as a template. Ruby expressions in template_string is evaluated in the scope of the caller.
HTree() and HTree{} returns a tree as an instance of HTree::Doc.