class Mechanize::FileConnection
Wrapper to make a file URI work like an http URI
Public Class Methods
Source
# File lib/mechanize/file_connection.rb, line 9 def self.new *a @instance ||= super end
Calls superclass method
Public Instance Methods
Source
# File lib/mechanize/file_connection.rb, line 13 def request uri, request file_path = uri.select(:host, :path) .select { |part| part && (part.length > 0) } .join(":") yield Mechanize::FileResponse.new(Mechanize::Util.uri_unescape(file_path)) end