Class: Mechanize::FileRequest
- Inherits:
-
Object
- Object
- Mechanize::FileRequest
- Defined in:
- lib/mechanize/file_request.rb
Overview
A wrapper for a file URI that makes a request that works like a Net::HTTPRequest
Instance Attribute Summary collapse
-
#uri ⇒ Object
Returns the value of attribute uri.
Instance Method Summary collapse
- #add_field(*a) ⇒ Object (also: #[]=)
- #each_header ⇒ Object
-
#initialize(uri) ⇒ FileRequest
constructor
A new instance of FileRequest.
- #path ⇒ Object
Constructor Details
#initialize(uri) ⇒ FileRequest
Returns a new instance of FileRequest.
9 10 11 |
# File 'lib/mechanize/file_request.rb', line 9 def initialize uri @uri = uri end |
Instance Attribute Details
#uri ⇒ Object
Returns the value of attribute uri.
7 8 9 |
# File 'lib/mechanize/file_request.rb', line 7 def uri @uri end |
Instance Method Details
#add_field(*a) ⇒ Object Also known as: []=
13 14 |
# File 'lib/mechanize/file_request.rb', line 13 def add_field *a end |
#each_header ⇒ Object
22 23 |
# File 'lib/mechanize/file_request.rb', line 22 def each_header end |
#path ⇒ Object
18 19 20 |
# File 'lib/mechanize/file_request.rb', line 18 def path @uri.path end |