Sha256: f66d3d484cf103403ecc52f42b9ca52ce0b072db1332c2e745ec546678a693b0
Contents?: true
Size: 880 Bytes
Versions: 4
Compression:
Stored size: 880 Bytes
Contents
require 'hpricot/htmlinfo' def Hpricot(input = nil, opts = {}, &blk) Hpricot.make(input, opts, &blk) end module Hpricot # Exception class used for any errors related to deficiencies in the system when # handling the character encodings of a document. class EncodingError < StandardError; end # Hpricot.parse parses <i>input</i> and return a document tree. # represented by Hpricot::Doc. def Hpricot.parse(input = nil, opts = {}, &blk) make(input, opts, &blk) end # Hpricot::XML parses <i>input</i>, disregarding all the HTML rules # and returning a document tree. def Hpricot.XML(input = nil, opts = {}, &blk) opts.merge! :xml => true make(input, opts, &blk) end # :stopdoc: def Hpricot.make(input = nil, opts = {}, &blk) if blk Hpricot.build(&blk) else Hpricot.scan(input, opts) end end # :startdoc: end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
adamh-hpricot-0.6.168 | lib/hpricot/parse.rb |
adamh-hpricot-0.6.169 | lib/hpricot/parse.rb |
adamh-hpricot-0.6.170 | lib/hpricot/parse.rb |
adamh-hpricot-0.6.171 | lib/hpricot/parse.rb |