Class: Mechanize::FileConnection

Inherits:
Object
  • Object
show all
Defined in:
lib/mechanize/file_connection.rb

Overview

Wrapper to make a file URI work like an http URI

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.new(*a) ⇒ Object



8
9
10
# File 'lib/mechanize/file_connection.rb', line 8

def self.new *a
  @instance ||= super
end

Instance Method Details

#request(uri, request) {|Mechanize::FileResponse.new Mechanize::Util.uri_unescape uri.path| ... } ⇒ Object

Yields:



12
13
14
# File 'lib/mechanize/file_connection.rb', line 12

def request uri, request
  yield Mechanize::FileResponse.new Mechanize::Util.uri_unescape uri.path
end