Object
Fake response for dealing with file:/// requests
# File lib/mechanize/file_response.rb, line 32 def [](key) return nil unless key.downcase == 'content-type' return 'text/html' if directory? return 'text/html' if ['.html', '.xhtml'].any? { |extn| @file_path =~ /#{extn}$/ } nil end
# File lib/mechanize/file_response.rb, line 21 def code ::File.exists?(@file_path) ? 200 : 400 end
# File lib/mechanize/file_response.rb, line 25 def content_length return dir_body.length if directory? ::File.exists?(@file_path) ? ::File.stat(@file_path).size : 0 end
# File lib/mechanize/file_response.rb, line 30 def each_header; end
Generated with the Darkfish Rdoc Generator 2.