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
- #response_body_permitted? ⇒ Boolean
Constructor Details
#initialize(uri) ⇒ FileRequest
Returns a new instance of FileRequest.
10 11 12 |
# File 'lib/mechanize/file_request.rb', line 10 def initialize uri @uri = uri end |
Instance Attribute Details
#uri ⇒ Object
Returns the value of attribute uri.
8 9 10 |
# File 'lib/mechanize/file_request.rb', line 8 def uri @uri end |
Instance Method Details
#add_field(*a) ⇒ Object Also known as: []=
14 15 |
# File 'lib/mechanize/file_request.rb', line 14 def add_field *a end |
#each_header ⇒ Object
23 24 |
# File 'lib/mechanize/file_request.rb', line 23 def each_header end |
#path ⇒ Object
19 20 21 |
# File 'lib/mechanize/file_request.rb', line 19 def path @uri.path end |
#response_body_permitted? ⇒ Boolean
26 27 28 |
# File 'lib/mechanize/file_request.rb', line 26 def response_body_permitted? true end |