Class: Mechanize::FileRequest

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#uriObject

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_headerObject



23
24
# File 'lib/mechanize/file_request.rb', line 23

def each_header
end

#pathObject



19
20
21
# File 'lib/mechanize/file_request.rb', line 19

def path
  @uri.path
end

#response_body_permitted?Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/mechanize/file_request.rb', line 26

def response_body_permitted?
  true
end