# File lib/mechanize/page.rb, line 27 def initialize(uri=nil, response=nil, body=nil, code=nil, mech=nil) super(uri, response, body, code) @watch_for_set ||= {} @mech ||= mech raise Mechanize::ContentTypeError.new(response['content-type']) unless content_type() =~ /^text\/html/ # construct parser and feed with HTML if body && response @parser ||= Hpricot.parse(body) parse_html end end