Method: Mechanize::HTTP::Agent#connection_for
- Defined in:
- lib/mechanize/http/agent.rb
#connection_for(uri) ⇒ Object
:section: Request
436 437 438 439 440 441 442 443 |
# File 'lib/mechanize/http/agent.rb', line 436 def connection_for uri case uri.scheme.downcase when 'http', 'https' then return @http when 'file' then return Mechanize::FileConnection.new end end |