Class: Typhoeus::Response
- Inherits:
-
Object
- Object
- Typhoeus::Response
- Defined in:
- lib/cms_scanner/typhoeus/response.rb
Overview
Custom Response class
Instance Method Summary collapse
-
#html ⇒ Nokogiri::HTML
The response’s body parsed by Nokogiri::HTML.
-
#xml ⇒ Nokogiri::XML
The response’s body parsed by Nokogiri::XML.
Instance Method Details
#html ⇒ Nokogiri::HTML
Returns The response’s body parsed by Nokogiri::HTML.
5 6 7 |
# File 'lib/cms_scanner/typhoeus/response.rb', line 5 def html @html ||= Nokogiri::HTML(body.encode('UTF-8', invalid: :replace, undef: :replace)) end |
#xml ⇒ Nokogiri::XML
Returns The response’s body parsed by Nokogiri::XML.
10 11 12 |
# File 'lib/cms_scanner/typhoeus/response.rb', line 10 def xml @xml ||= Nokogiri::XML(body.encode('UTF-8', invalid: :replace, undef: :replace)) end |