class Typhoeus::Response
Custom Response
class
Public Instance Methods
Source
# File lib/cms_scanner/typhoeus/response.rb, line 7 def html @html ||= Nokogiri::HTML(body.encode('UTF-8', invalid: :replace, undef: :replace)) end
@return [ Nokogiri::XML ] The response’s body parsed by Nokogiri::HTML
Source
# File lib/cms_scanner/typhoeus/response.rb, line 18 def request_size super || 0 end
Override of the original to ensure an integer is returned @return [ Integer ]
Calls superclass method
Source
# File lib/cms_scanner/typhoeus/response.rb, line 23 def size (body.nil? ? 0 : body.size) + (response_headers.nil? ? 0 : response_headers.size) end
@return [ Integer ]
Source
# File lib/cms_scanner/typhoeus/response.rb, line 12 def xml @xml ||= Nokogiri::XML(body.encode('UTF-8', invalid: :replace, undef: :replace)) end
@return [ Nokogiri::XML ] The response’s body parsed by Nokogiri::XML