class Mechanize::FileConnection
Wrapper to make a file URI work like an http URI
Public Class Methods
new(*a)
click to toggle source
Calls superclass method
# File lib/mechanize/file_connection.rb, line 9 def self.new *a @instance ||= super end
Public Instance Methods
request(uri, request) { |file_response(uri_unescape)| ... }
click to toggle 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