static public Method

Hpricot.build(ele = Doc.new, assigns = {}, &blk)

There's no documentation for this item.

Source Code

# File hpricot/builder.rb, line 6
def self.build(ele = Doc.new, assigns = {}, &blk)
  ele.extend Builder
  assigns.each do |k, v|
    ele.instance_variable_set("@#{k}", v)
  end
  ele.instance_eval &blk
  ele
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.