Method: XRay::HTML::Parser#parse_doc

Defined in:
lib/html/parser.rb

#parse_docObject



33
34
35
36
37
38
39
40
41
# File 'lib/html/parser.rb', line 33

def parse_doc
  nodes = batch(:parse_element)
  case nodes.size
    when 0 then nil
    when 1 then nodes[0]
    else 
      ::XRay::HTML::Document.new( nodes )
  end
end