mechanize 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of mechanize might be problematic. Click here for more details.
- data/EXAMPLES +55 -0
- data/README +3 -12
- data/lib/mechanize/cookie.rb +1 -2
- data/lib/mechanize/form.rb +182 -0
- data/lib/mechanize/form_elements.rb +105 -0
- data/lib/mechanize/page.rb +130 -0
- data/lib/mechanize/page_elements.rb +28 -0
- data/lib/mechanize.rb +27 -369
- data/test/htdocs/file_upload.html +13 -0
- data/test/htdocs/frame_test.html +23 -0
- data/test/server.rb +1 -0
- data/test/servlets.rb +6 -0
- data/test/tc_cookies.rb +2 -3
- data/test/tc_forms.rb +2 -3
- data/test/tc_frames.rb +22 -0
- data/test/tc_links.rb +2 -3
- data/test/tc_mech.rb +2 -3
- data/test/tc_response_code.rb +2 -3
- data/test/tc_upload.rb +34 -0
- data/test/test_includes.rb +5 -0
- data/test/ts_mech.rb +2 -0
- metadata +59 -307
- data/doc/classes/Net/HTTP/Copy.html +0 -134
- data/doc/classes/Net/HTTP/Delete.html +0 -134
- data/doc/classes/Net/HTTP/Get.html +0 -134
- data/doc/classes/Net/HTTP/Head.html +0 -134
- data/doc/classes/Net/HTTP/Lock.html +0 -134
- data/doc/classes/Net/HTTP/Mkcol.html +0 -134
- data/doc/classes/Net/HTTP/Move.html +0 -134
- data/doc/classes/Net/HTTP/Options.html +0 -134
- data/doc/classes/Net/HTTP/Post.html +0 -134
- data/doc/classes/Net/HTTP/Propfind.html +0 -134
- data/doc/classes/Net/HTTP/Proppatch.html +0 -134
- data/doc/classes/Net/HTTP/Put.html +0 -134
- data/doc/classes/Net/HTTP/Trace.html +0 -134
- data/doc/classes/Net/HTTP/Unlock.html +0 -134
- data/doc/classes/Net/HTTP.html +0 -1716
- data/doc/classes/Net/HTTP.src/M000103.html +0 -18
- data/doc/classes/Net/HTTP.src/M000104.html +0 -18
- data/doc/classes/Net/HTTP.src/M000105.html +0 -18
- data/doc/classes/Net/HTTP.src/M000106.html +0 -18
- data/doc/classes/Net/HTTP.src/M000107.html +0 -29
- data/doc/classes/Net/HTTP.src/M000108.html +0 -18
- data/doc/classes/Net/HTTP.src/M000109.html +0 -22
- data/doc/classes/Net/HTTP.src/M000110.html +0 -18
- data/doc/classes/Net/HTTP.src/M000111.html +0 -18
- data/doc/classes/Net/HTTP.src/M000112.html +0 -18
- data/doc/classes/Net/HTTP.src/M000113.html +0 -18
- data/doc/classes/Net/HTTP.src/M000114.html +0 -22
- data/doc/classes/Net/HTTP.src/M000115.html +0 -29
- data/doc/classes/Net/HTTP.src/M000116.html +0 -18
- data/doc/classes/Net/HTTP.src/M000117.html +0 -19
- data/doc/classes/Net/HTTP.src/M000118.html +0 -19
- data/doc/classes/Net/HTTP.src/M000119.html +0 -18
- data/doc/classes/Net/HTTP.src/M000121.html +0 -18
- data/doc/classes/Net/HTTP.src/M000122.html +0 -28
- data/doc/classes/Net/HTTP.src/M000123.html +0 -19
- data/doc/classes/Net/HTTP.src/M000124.html +0 -30
- data/doc/classes/Net/HTTP.src/M000125.html +0 -18
- data/doc/classes/Net/HTTP.src/M000126.html +0 -18
- data/doc/classes/Net/HTTP.src/M000127.html +0 -18
- data/doc/classes/Net/HTTP.src/M000128.html +0 -18
- data/doc/classes/Net/HTTP.src/M000129.html +0 -18
- data/doc/classes/Net/HTTP.src/M000130.html +0 -18
- data/doc/classes/Net/HTTP.src/M000133.html +0 -28
- data/doc/classes/Net/HTTP.src/M000134.html +0 -20
- data/doc/classes/Net/HTTP.src/M000135.html +0 -28
- data/doc/classes/Net/HTTP.src/M000136.html +0 -18
- data/doc/classes/Net/HTTP.src/M000137.html +0 -18
- data/doc/classes/Net/HTTP.src/M000138.html +0 -18
- data/doc/classes/Net/HTTP.src/M000139.html +0 -18
- data/doc/classes/Net/HTTP.src/M000140.html +0 -18
- data/doc/classes/Net/HTTP.src/M000141.html +0 -18
- data/doc/classes/Net/HTTP.src/M000142.html +0 -18
- data/doc/classes/Net/HTTP.src/M000143.html +0 -18
- data/doc/classes/Net/HTTP.src/M000144.html +0 -18
- data/doc/classes/Net/HTTP.src/M000145.html +0 -18
- data/doc/classes/Net/HTTP.src/M000146.html +0 -18
- data/doc/classes/Net/HTTP.src/M000147.html +0 -18
- data/doc/classes/Net/HTTP.src/M000148.html +0 -18
- data/doc/classes/Net/HTTP.src/M000152.html +0 -19
- data/doc/classes/Net/HTTP.src/M000153.html +0 -39
- data/doc/classes/Net/HTTP.src/M000154.html +0 -18
- data/doc/classes/Net/HTTP.src/M000156.html +0 -24
- data/doc/classes/Net/HTTP.src/M000157.html +0 -18
- data/doc/classes/Net/HTTP.src/M000158.html +0 -19
- data/doc/classes/Net/HTTP.src/M000159.html +0 -21
- data/doc/classes/Net/HTTP.src/M000161.html +0 -19
- data/doc/classes/Net/HTTPError.html +0 -120
- data/doc/classes/Net/HTTPExceptions.html +0 -137
- data/doc/classes/Net/HTTPFatalError.html +0 -120
- data/doc/classes/Net/HTTPGenericRequest.html +0 -274
- data/doc/classes/Net/HTTPGenericRequest.src/M000088.html +0 -26
- data/doc/classes/Net/HTTPGenericRequest.src/M000089.html +0 -18
- data/doc/classes/Net/HTTPGenericRequest.src/M000090.html +0 -18
- data/doc/classes/Net/HTTPGenericRequest.src/M000091.html +0 -18
- data/doc/classes/Net/HTTPGenericRequest.src/M000092.html +0 -19
- data/doc/classes/Net/HTTPGenericRequest.src/M000093.html +0 -20
- data/doc/classes/Net/HTTPGenericRequest.src/M000094.html +0 -20
- data/doc/classes/Net/HTTPHeader.html +0 -734
- data/doc/classes/Net/HTTPHeader.src/M000055.html +0 -23
- data/doc/classes/Net/HTTPHeader.src/M000056.html +0 -19
- data/doc/classes/Net/HTTPHeader.src/M000057.html +0 -22
- data/doc/classes/Net/HTTPHeader.src/M000058.html +0 -22
- data/doc/classes/Net/HTTPHeader.src/M000059.html +0 -19
- data/doc/classes/Net/HTTPHeader.src/M000060.html +0 -19
- data/doc/classes/Net/HTTPHeader.src/M000061.html +0 -20
- data/doc/classes/Net/HTTPHeader.src/M000063.html +0 -18
- data/doc/classes/Net/HTTPHeader.src/M000065.html +0 -20
- data/doc/classes/Net/HTTPHeader.src/M000066.html +0 -20
- data/doc/classes/Net/HTTPHeader.src/M000067.html +0 -18
- data/doc/classes/Net/HTTPHeader.src/M000068.html +0 -18
- data/doc/classes/Net/HTTPHeader.src/M000069.html +0 -18
- data/doc/classes/Net/HTTPHeader.src/M000070.html +0 -20
- data/doc/classes/Net/HTTPHeader.src/M000072.html +0 -30
- data/doc/classes/Net/HTTPHeader.src/M000073.html +0 -43
- data/doc/classes/Net/HTTPHeader.src/M000075.html +0 -21
- data/doc/classes/Net/HTTPHeader.src/M000076.html +0 -22
- data/doc/classes/Net/HTTPHeader.src/M000077.html +0 -20
- data/doc/classes/Net/HTTPHeader.src/M000078.html +0 -21
- data/doc/classes/Net/HTTPHeader.src/M000079.html +0 -19
- data/doc/classes/Net/HTTPHeader.src/M000080.html +0 -18
- data/doc/classes/Net/HTTPHeader.src/M000081.html +0 -19
- data/doc/classes/Net/HTTPHeader.src/M000082.html +0 -19
- data/doc/classes/Net/HTTPHeader.src/M000083.html +0 -23
- data/doc/classes/Net/HTTPHeader.src/M000084.html +0 -18
- data/doc/classes/Net/HTTPHeader.src/M000086.html +0 -18
- data/doc/classes/Net/HTTPHeader.src/M000087.html +0 -18
- data/doc/classes/Net/HTTPRequest.html +0 -150
- data/doc/classes/Net/HTTPRequest.src/M000102.html +0 -21
- data/doc/classes/Net/HTTPResponse.html +0 -425
- data/doc/classes/Net/HTTPResponse.src/M000162.html +0 -18
- data/doc/classes/Net/HTTPResponse.src/M000163.html +0 -18
- data/doc/classes/Net/HTTPResponse.src/M000164.html +0 -23
- data/doc/classes/Net/HTTPResponse.src/M000165.html +0 -18
- data/doc/classes/Net/HTTPResponse.src/M000166.html +0 -32
- data/doc/classes/Net/HTTPResponse.src/M000167.html +0 -18
- data/doc/classes/Net/HTTPRetriableError.html +0 -120
- data/doc/classes/Net/HTTPServerException.html +0 -120
- data/doc/classes/Net/ProtoAuthError.html +0 -113
- data/doc/classes/Net/ProtoCommandError.html +0 -113
- data/doc/classes/Net/ProtoFatalError.html +0 -113
- data/doc/classes/Net/ProtoRetriableError.html +0 -113
- data/doc/classes/Net/ProtoServerError.html +0 -113
- data/doc/classes/Net/ProtoSyntaxError.html +0 -113
- data/doc/classes/Net/ProtoUnknownError.html +0 -113
- data/doc/classes/Net/ProtocolError.html +0 -111
- data/doc/classes/Net/WriteAdapter.html +0 -235
- data/doc/classes/Net/WriteAdapter.src/M000095.html +0 -19
- data/doc/classes/Net/WriteAdapter.src/M000096.html +0 -18
- data/doc/classes/Net/WriteAdapter.src/M000097.html +0 -18
- data/doc/classes/Net/WriteAdapter.src/M000099.html +0 -19
- data/doc/classes/Net/WriteAdapter.src/M000100.html +0 -18
- data/doc/classes/Net/WriteAdapter.src/M000101.html +0 -18
- data/doc/classes/REXML/Comment.html +0 -137
- data/doc/classes/REXML/Comment.src/M000053.html +0 -18
- data/doc/classes/REXML/Node.html +0 -240
- data/doc/classes/REXML/Node.src/M000047.html +0 -21
- data/doc/classes/REXML/Node.src/M000048.html +0 -21
- data/doc/classes/REXML/Node.src/M000049.html +0 -22
- data/doc/classes/REXML/Node.src/M000050.html +0 -18
- data/doc/classes/REXML/Node.src/M000051.html +0 -18
- data/doc/classes/REXML/Node.src/M000052.html +0 -18
- data/doc/classes/REXML/Text.html +0 -137
- data/doc/classes/REXML/Text.src/M000054.html +0 -18
- data/doc/classes/REXML.html +0 -109
- data/doc/classes/WWW/Button.html +0 -190
- data/doc/classes/WWW/Button.src/M000028.html +0 -18
- data/doc/classes/WWW/Button.src/M000029.html +0 -18
- data/doc/classes/WWW/Button.src/M000030.html +0 -25
- data/doc/classes/WWW/CheckBox.html +0 -160
- data/doc/classes/WWW/CheckBox.src/M000024.html +0 -18
- data/doc/classes/WWW/Cookie.html +0 -207
- data/doc/classes/WWW/Cookie.src/M000032.html +0 -59
- data/doc/classes/WWW/Cookie.src/M000033.html +0 -21
- data/doc/classes/WWW/Cookie.src/M000034.html +0 -18
- data/doc/classes/WWW/CookieJar.html +0 -197
- data/doc/classes/WWW/CookieJar.src/M000008.html +0 -18
- data/doc/classes/WWW/CookieJar.src/M000009.html +0 -22
- data/doc/classes/WWW/CookieJar.src/M000010.html +0 -33
- data/doc/classes/WWW/CookieJar.src/M000011.html +0 -18
- data/doc/classes/WWW/Field.html +0 -174
- data/doc/classes/WWW/Field.src/M000045.html +0 -18
- data/doc/classes/WWW/Field.src/M000046.html +0 -26
- data/doc/classes/WWW/FileUpload.html +0 -163
- data/doc/classes/WWW/FileUpload.src/M000031.html +0 -19
- data/doc/classes/WWW/Form.html +0 -152
- data/doc/classes/WWW/Form.src/M000044.html +0 -19
- data/doc/classes/WWW/GlobalForm.html +0 -271
- data/doc/classes/WWW/GlobalForm.src/M000004.html +0 -24
- data/doc/classes/WWW/GlobalForm.src/M000005.html +0 -26
- data/doc/classes/WWW/GlobalForm.src/M000006.html +0 -46
- data/doc/classes/WWW/GlobalForm.src/M000007.html +0 -46
- data/doc/classes/WWW/ImageButton.html +0 -157
- data/doc/classes/WWW/ImageButton.src/M000027.html +0 -22
- data/doc/classes/WWW/Link.html +0 -160
- data/doc/classes/WWW/Link.src/M000025.html +0 -20
- data/doc/classes/WWW/Mechanize.html +0 -379
- data/doc/classes/WWW/Mechanize.src/M000013.html +0 -21
- data/doc/classes/WWW/Mechanize.src/M000014.html +0 -18
- data/doc/classes/WWW/Mechanize.src/M000015.html +0 -24
- data/doc/classes/WWW/Mechanize.src/M000016.html +0 -19
- data/doc/classes/WWW/Mechanize.src/M000017.html +0 -23
- data/doc/classes/WWW/Mechanize.src/M000018.html +0 -32
- data/doc/classes/WWW/Mechanize.src/M000019.html +0 -19
- data/doc/classes/WWW/Mechanize.src/M000020.html +0 -18
- data/doc/classes/WWW/Mechanize.src/M000021.html +0 -33
- data/doc/classes/WWW/Mechanize.src/M000022.html +0 -18
- data/doc/classes/WWW/Meta.html +0 -113
- data/doc/classes/WWW/Page.html +0 -313
- data/doc/classes/WWW/Page.src/M000036.html +0 -18
- data/doc/classes/WWW/Page.src/M000037.html +0 -18
- data/doc/classes/WWW/Page.src/M000038.html +0 -18
- data/doc/classes/WWW/Page.src/M000039.html +0 -19
- data/doc/classes/WWW/Page.src/M000040.html +0 -19
- data/doc/classes/WWW/Page.src/M000041.html +0 -19
- data/doc/classes/WWW/Page.src/M000042.html +0 -19
- data/doc/classes/WWW/Page.src/M000043.html +0 -19
- data/doc/classes/WWW/RadioButton.html +0 -160
- data/doc/classes/WWW/RadioButton.src/M000012.html +0 -18
- data/doc/classes/WWW/ResponseCodeError.html +0 -150
- data/doc/classes/WWW/ResponseCodeError.src/M000035.html +0 -18
- data/doc/classes/WWW/SelectList.html +0 -160
- data/doc/classes/WWW/SelectList.src/M000026.html +0 -28
- data/doc/classes/WWW.html +0 -130
- data/doc/created.rid +0 -1
- data/doc/files/CHANGELOG.html +0 -136
- data/doc/files/LICENSE.html +0 -531
- data/doc/files/README.html +0 -161
- data/doc/files/lib/mechanize/cookie_rb.html +0 -101
- data/doc/files/lib/mechanize/net-overrides/net/http_rb.html +0 -139
- data/doc/files/lib/mechanize/net-overrides/net/https_rb.html +0 -109
- data/doc/files/lib/mechanize/net-overrides/net/protocol_rb.html +0 -117
- data/doc/files/lib/mechanize/parsing_rb.html +0 -267
- data/doc/files/lib/mechanize/parsing_rb.src/M000001.html +0 -22
- data/doc/files/lib/mechanize/parsing_rb.src/M000002.html +0 -44
- data/doc/files/lib/mechanize/parsing_rb.src/M000003.html +0 -34
- data/doc/files/lib/mechanize_rb.html +0 -152
- data/doc/fr_class_index.html +0 -80
- data/doc/fr_file_index.html +0 -35
- data/doc/fr_method_index.html +0 -194
- data/doc/index.html +0 -24
- data/doc/rdoc-style.css +0 -208
@@ -1,23 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>get (WWW::Mechanize)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/mechanize.rb, line 463</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get</span>(<span class="ruby-identifier">url</span>)
|
15
|
-
<span class="ruby-identifier">cur_page</span> = <span class="ruby-identifier">current_page</span>() <span class="ruby-operator">||</span> <span class="ruby-constant">Page</span>.<span class="ruby-identifier">new</span>
|
16
|
-
|
17
|
-
<span class="ruby-comment cmt"># fetch the page</span>
|
18
|
-
<span class="ruby-identifier">page</span> = <span class="ruby-identifier">fetch_page</span>(<span class="ruby-identifier">to_absolute_uri</span>(<span class="ruby-identifier">url</span>, <span class="ruby-identifier">cur_page</span>), <span class="ruby-identifier">:get</span>, <span class="ruby-identifier">cur_page</span>)
|
19
|
-
<span class="ruby-identifier">add_to_history</span>(<span class="ruby-identifier">page</span>)
|
20
|
-
<span class="ruby-identifier">page</span>
|
21
|
-
<span class="ruby-keyword kw">end</span></pre>
|
22
|
-
</body>
|
23
|
-
</html>
|
@@ -1,32 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>post (WWW::Mechanize)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/mechanize.rb, line 472</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">post</span>(<span class="ruby-identifier">url</span>, <span class="ruby-identifier">query</span>={})
|
15
|
-
<span class="ruby-identifier">cur_page</span> = <span class="ruby-identifier">current_page</span>() <span class="ruby-operator">||</span> <span class="ruby-constant">Page</span>.<span class="ruby-identifier">new</span>
|
16
|
-
|
17
|
-
<span class="ruby-identifier">request_data</span> = [<span class="ruby-identifier">build_query_string</span>(<span class="ruby-identifier">query</span>)]
|
18
|
-
|
19
|
-
<span class="ruby-comment cmt"># this is called before the request is sent</span>
|
20
|
-
<span class="ruby-identifier">pre_request_hook</span> = <span class="ruby-identifier">proc</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">request</span><span class="ruby-operator">|</span>
|
21
|
-
<span class="ruby-identifier">log</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-node">"query: #{ query.inspect }"</span>)
|
22
|
-
<span class="ruby-identifier">request</span>.<span class="ruby-identifier">add_field</span>(<span class="ruby-value str">'Content-Type'</span>, <span class="ruby-value str">'application/x-www-form-urlencoded'</span>)
|
23
|
-
<span class="ruby-identifier">request</span>.<span class="ruby-identifier">add_field</span>(<span class="ruby-value str">'Content-Length'</span>, <span class="ruby-identifier">request_data</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">size</span>.<span class="ruby-identifier">to_s</span>)
|
24
|
-
}
|
25
|
-
|
26
|
-
<span class="ruby-comment cmt"># fetch the page</span>
|
27
|
-
<span class="ruby-identifier">page</span> = <span class="ruby-identifier">fetch_page</span>(<span class="ruby-identifier">to_absolute_uri</span>(<span class="ruby-identifier">url</span>, <span class="ruby-identifier">cur_page</span>), <span class="ruby-identifier">:post</span>, <span class="ruby-identifier">cur_page</span>, <span class="ruby-identifier">pre_request_hook</span>, <span class="ruby-identifier">request_data</span>)
|
28
|
-
<span class="ruby-identifier">add_to_history</span>(<span class="ruby-identifier">page</span>)
|
29
|
-
<span class="ruby-identifier">page</span>
|
30
|
-
<span class="ruby-keyword kw">end</span></pre>
|
31
|
-
</body>
|
32
|
-
</html>
|
@@ -1,19 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>click (WWW::Mechanize)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/mechanize.rb, line 490</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">click</span>(<span class="ruby-identifier">link</span>)
|
15
|
-
<span class="ruby-identifier">uri</span> = <span class="ruby-identifier">to_absolute_uri</span>(<span class="ruby-identifier">link</span>.<span class="ruby-identifier">href</span>)
|
16
|
-
<span class="ruby-identifier">get</span>(<span class="ruby-identifier">uri</span>)
|
17
|
-
<span class="ruby-keyword kw">end</span></pre>
|
18
|
-
</body>
|
19
|
-
</html>
|
@@ -1,18 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>back (WWW::Mechanize)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/mechanize.rb, line 495</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">back</span>
|
15
|
-
<span class="ruby-ivar">@history</span>.<span class="ruby-identifier">pop</span>
|
16
|
-
<span class="ruby-keyword kw">end</span></pre>
|
17
|
-
</body>
|
18
|
-
</html>
|
@@ -1,33 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>submit (WWW::Mechanize)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/mechanize.rb, line 499</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">submit</span>(<span class="ruby-identifier">form</span>, <span class="ruby-identifier">button</span>=<span class="ruby-keyword kw">nil</span>)
|
15
|
-
<span class="ruby-identifier">query</span> = <span class="ruby-identifier">form</span>.<span class="ruby-identifier">build_query</span>
|
16
|
-
<span class="ruby-identifier">button</span>.<span class="ruby-identifier">add_to_query</span>(<span class="ruby-identifier">query</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">button</span>
|
17
|
-
|
18
|
-
<span class="ruby-identifier">uri</span> = <span class="ruby-identifier">to_absolute_uri</span>(<span class="ruby-constant">URI</span><span class="ruby-operator">::</span><span class="ruby-identifier">escape</span>(<span class="ruby-identifier">form</span>.<span class="ruby-identifier">action</span>))
|
19
|
-
<span class="ruby-keyword kw">case</span> <span class="ruby-identifier">form</span>.<span class="ruby-identifier">method</span>.<span class="ruby-identifier">upcase</span>
|
20
|
-
<span class="ruby-keyword kw">when</span> <span class="ruby-value str">'POST'</span>
|
21
|
-
<span class="ruby-identifier">post</span>(<span class="ruby-identifier">uri</span>, <span class="ruby-identifier">query</span>)
|
22
|
-
<span class="ruby-keyword kw">when</span> <span class="ruby-value str">'GET'</span>
|
23
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">uri</span>.<span class="ruby-identifier">query</span>.<span class="ruby-identifier">nil?</span>
|
24
|
-
<span class="ruby-identifier">get</span>(<span class="ruby-identifier">uri</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">+</span> <span class="ruby-value str">"?"</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">build_query_string</span>(<span class="ruby-identifier">query</span>))
|
25
|
-
<span class="ruby-keyword kw">else</span>
|
26
|
-
<span class="ruby-identifier">get</span>(<span class="ruby-identifier">uri</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">+</span> <span class="ruby-value str">"&"</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">build_query_string</span>(<span class="ruby-identifier">query</span>))
|
27
|
-
<span class="ruby-keyword kw">end</span>
|
28
|
-
<span class="ruby-keyword kw">else</span>
|
29
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-value str">'unsupported method'</span>
|
30
|
-
<span class="ruby-keyword kw">end</span>
|
31
|
-
<span class="ruby-keyword kw">end</span></pre>
|
32
|
-
</body>
|
33
|
-
</html>
|
@@ -1,18 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>current_page (WWW::Mechanize)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/mechanize.rb, line 518</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">current_page</span>
|
15
|
-
<span class="ruby-ivar">@history</span>.<span class="ruby-identifier">last</span>
|
16
|
-
<span class="ruby-keyword kw">end</span></pre>
|
17
|
-
</body>
|
18
|
-
</html>
|
data/doc/classes/WWW/Meta.html
DELETED
@@ -1,113 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
-
<head>
|
8
|
-
<title>Class: WWW::Meta</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
-
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
-
<script type="text/javascript">
|
13
|
-
// <![CDATA[
|
14
|
-
|
15
|
-
function popupCode( url ) {
|
16
|
-
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
-
}
|
18
|
-
|
19
|
-
function toggleCode( id ) {
|
20
|
-
if ( document.getElementById )
|
21
|
-
elem = document.getElementById( id );
|
22
|
-
else if ( document.all )
|
23
|
-
elem = eval( "document.all." + id );
|
24
|
-
else
|
25
|
-
return false;
|
26
|
-
|
27
|
-
elemStyle = elem.style;
|
28
|
-
|
29
|
-
if ( elemStyle.display != "block" ) {
|
30
|
-
elemStyle.display = "block"
|
31
|
-
} else {
|
32
|
-
elemStyle.display = "none"
|
33
|
-
}
|
34
|
-
|
35
|
-
return true;
|
36
|
-
}
|
37
|
-
|
38
|
-
// Make codeblocks hidden by default
|
39
|
-
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
-
|
41
|
-
// ]]>
|
42
|
-
</script>
|
43
|
-
|
44
|
-
</head>
|
45
|
-
<body>
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
<div id="classHeader">
|
50
|
-
<table class="header-table">
|
51
|
-
<tr class="top-aligned-row">
|
52
|
-
<td><strong>Class</strong></td>
|
53
|
-
<td class="class-name-in-header">WWW::Meta</td>
|
54
|
-
</tr>
|
55
|
-
<tr class="top-aligned-row">
|
56
|
-
<td><strong>In:</strong></td>
|
57
|
-
<td>
|
58
|
-
<a href="../../files/lib/mechanize_rb.html">
|
59
|
-
lib/mechanize.rb
|
60
|
-
</a>
|
61
|
-
<br />
|
62
|
-
</td>
|
63
|
-
</tr>
|
64
|
-
|
65
|
-
<tr class="top-aligned-row">
|
66
|
-
<td><strong>Parent:</strong></td>
|
67
|
-
<td>
|
68
|
-
<a href="Link.html">
|
69
|
-
Link
|
70
|
-
</a>
|
71
|
-
</td>
|
72
|
-
</tr>
|
73
|
-
</table>
|
74
|
-
</div>
|
75
|
-
<!-- banner header -->
|
76
|
-
|
77
|
-
<div id="bodyContent">
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
<div id="contextContent">
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
</div>
|
86
|
-
|
87
|
-
|
88
|
-
</div>
|
89
|
-
|
90
|
-
|
91
|
-
<!-- if includes -->
|
92
|
-
|
93
|
-
<div id="section">
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
<!-- if method_list -->
|
103
|
-
|
104
|
-
|
105
|
-
</div>
|
106
|
-
|
107
|
-
|
108
|
-
<div id="validator-badges">
|
109
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
110
|
-
</div>
|
111
|
-
|
112
|
-
</body>
|
113
|
-
</html>
|
data/doc/classes/WWW/Page.html
DELETED
@@ -1,313 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
-
<head>
|
8
|
-
<title>Class: WWW::Page</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
-
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
-
<script type="text/javascript">
|
13
|
-
// <![CDATA[
|
14
|
-
|
15
|
-
function popupCode( url ) {
|
16
|
-
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
-
}
|
18
|
-
|
19
|
-
function toggleCode( id ) {
|
20
|
-
if ( document.getElementById )
|
21
|
-
elem = document.getElementById( id );
|
22
|
-
else if ( document.all )
|
23
|
-
elem = eval( "document.all." + id );
|
24
|
-
else
|
25
|
-
return false;
|
26
|
-
|
27
|
-
elemStyle = elem.style;
|
28
|
-
|
29
|
-
if ( elemStyle.display != "block" ) {
|
30
|
-
elemStyle.display = "block"
|
31
|
-
} else {
|
32
|
-
elemStyle.display = "none"
|
33
|
-
}
|
34
|
-
|
35
|
-
return true;
|
36
|
-
}
|
37
|
-
|
38
|
-
// Make codeblocks hidden by default
|
39
|
-
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
-
|
41
|
-
// ]]>
|
42
|
-
</script>
|
43
|
-
|
44
|
-
</head>
|
45
|
-
<body>
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
<div id="classHeader">
|
50
|
-
<table class="header-table">
|
51
|
-
<tr class="top-aligned-row">
|
52
|
-
<td><strong>Class</strong></td>
|
53
|
-
<td class="class-name-in-header">WWW::Page</td>
|
54
|
-
</tr>
|
55
|
-
<tr class="top-aligned-row">
|
56
|
-
<td><strong>In:</strong></td>
|
57
|
-
<td>
|
58
|
-
<a href="../../files/lib/mechanize_rb.html">
|
59
|
-
lib/mechanize.rb
|
60
|
-
</a>
|
61
|
-
<br />
|
62
|
-
</td>
|
63
|
-
</tr>
|
64
|
-
|
65
|
-
<tr class="top-aligned-row">
|
66
|
-
<td><strong>Parent:</strong></td>
|
67
|
-
<td>
|
68
|
-
Object
|
69
|
-
</td>
|
70
|
-
</tr>
|
71
|
-
</table>
|
72
|
-
</div>
|
73
|
-
<!-- banner header -->
|
74
|
-
|
75
|
-
<div id="bodyContent">
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
<div id="contextContent">
|
80
|
-
|
81
|
-
<div id="description">
|
82
|
-
<h1>Synopsis</h1>
|
83
|
-
<p>
|
84
|
-
This class encapsulates a page.
|
85
|
-
</p>
|
86
|
-
<h2>Example</h2>
|
87
|
-
<pre>
|
88
|
-
require 'rubygems'
|
89
|
-
require 'mechanize'
|
90
|
-
require 'logger'
|
91
|
-
|
92
|
-
class Body
|
93
|
-
def initialize(node)
|
94
|
-
puts node.attributes['bgcolor']
|
95
|
-
end
|
96
|
-
end
|
97
|
-
|
98
|
-
agent = WWW::Mechanize.new { |a| a.log = Logger.new("mech.log") }
|
99
|
-
agent.user_agent_alias = 'Mac Safari'
|
100
|
-
page = agent.get("http://www.google.com/")
|
101
|
-
page.watch_for_set = { 'body' => Body }
|
102
|
-
|
103
|
-
body = page.watches
|
104
|
-
</pre>
|
105
|
-
|
106
|
-
</div>
|
107
|
-
|
108
|
-
|
109
|
-
</div>
|
110
|
-
|
111
|
-
<div id="method-list">
|
112
|
-
<h3 class="section-bar">Methods</h3>
|
113
|
-
|
114
|
-
<div class="name-list">
|
115
|
-
<a href="#M000038">content_type</a>
|
116
|
-
<a href="#M000039">forms</a>
|
117
|
-
<a href="#M000037">header</a>
|
118
|
-
<a href="#M000040">links</a>
|
119
|
-
<a href="#M000043">meta</a>
|
120
|
-
<a href="#M000036">new</a>
|
121
|
-
<a href="#M000041">root</a>
|
122
|
-
<a href="#M000042">watches</a>
|
123
|
-
</div>
|
124
|
-
</div>
|
125
|
-
|
126
|
-
</div>
|
127
|
-
|
128
|
-
|
129
|
-
<!-- if includes -->
|
130
|
-
|
131
|
-
<div id="section">
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
<div id="attribute-list">
|
138
|
-
<h3 class="section-bar">Attributes</h3>
|
139
|
-
|
140
|
-
<div class="name-list">
|
141
|
-
<table>
|
142
|
-
<tr class="top-aligned-row context-row">
|
143
|
-
<td class="context-item-name">body</td>
|
144
|
-
<td class="context-item-value"> [RW] </td>
|
145
|
-
<td class="context-item-desc"></td>
|
146
|
-
</tr>
|
147
|
-
<tr class="top-aligned-row context-row">
|
148
|
-
<td class="context-item-name">code</td>
|
149
|
-
<td class="context-item-value"> [RW] </td>
|
150
|
-
<td class="context-item-desc"></td>
|
151
|
-
</tr>
|
152
|
-
<tr class="top-aligned-row context-row">
|
153
|
-
<td class="context-item-name">cookies</td>
|
154
|
-
<td class="context-item-value"> [RW] </td>
|
155
|
-
<td class="context-item-desc"></td>
|
156
|
-
</tr>
|
157
|
-
<tr class="top-aligned-row context-row">
|
158
|
-
<td class="context-item-name">response</td>
|
159
|
-
<td class="context-item-value"> [RW] </td>
|
160
|
-
<td class="context-item-desc"></td>
|
161
|
-
</tr>
|
162
|
-
<tr class="top-aligned-row context-row">
|
163
|
-
<td class="context-item-name">uri</td>
|
164
|
-
<td class="context-item-value"> [RW] </td>
|
165
|
-
<td class="context-item-desc"></td>
|
166
|
-
</tr>
|
167
|
-
<tr class="top-aligned-row context-row">
|
168
|
-
<td class="context-item-name">watch_for_set</td>
|
169
|
-
<td class="context-item-value"> [RW] </td>
|
170
|
-
<td class="context-item-desc"></td>
|
171
|
-
</tr>
|
172
|
-
</table>
|
173
|
-
</div>
|
174
|
-
</div>
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
<!-- if method_list -->
|
179
|
-
<div id="methods">
|
180
|
-
<h3 class="section-bar">Public Class methods</h3>
|
181
|
-
|
182
|
-
<div id="method-M000036" class="method-detail">
|
183
|
-
<a name="M000036"></a>
|
184
|
-
|
185
|
-
<div class="method-heading">
|
186
|
-
<a href="Page.src/M000036.html" target="Code" class="method-signature"
|
187
|
-
onclick="popupCode('Page.src/M000036.html');return false;">
|
188
|
-
<span class="method-name">new</span><span class="method-args">(uri=nil, cookies=[], response=nil, body=nil, code=nil)</span>
|
189
|
-
</a>
|
190
|
-
</div>
|
191
|
-
|
192
|
-
<div class="method-description">
|
193
|
-
</div>
|
194
|
-
</div>
|
195
|
-
|
196
|
-
<h3 class="section-bar">Public Instance methods</h3>
|
197
|
-
|
198
|
-
<div id="method-M000038" class="method-detail">
|
199
|
-
<a name="M000038"></a>
|
200
|
-
|
201
|
-
<div class="method-heading">
|
202
|
-
<a href="Page.src/M000038.html" target="Code" class="method-signature"
|
203
|
-
onclick="popupCode('Page.src/M000038.html');return false;">
|
204
|
-
<span class="method-name">content_type</span><span class="method-args">()</span>
|
205
|
-
</a>
|
206
|
-
</div>
|
207
|
-
|
208
|
-
<div class="method-description">
|
209
|
-
</div>
|
210
|
-
</div>
|
211
|
-
|
212
|
-
<div id="method-M000039" class="method-detail">
|
213
|
-
<a name="M000039"></a>
|
214
|
-
|
215
|
-
<div class="method-heading">
|
216
|
-
<a href="Page.src/M000039.html" target="Code" class="method-signature"
|
217
|
-
onclick="popupCode('Page.src/M000039.html');return false;">
|
218
|
-
<span class="method-name">forms</span><span class="method-args">()</span>
|
219
|
-
</a>
|
220
|
-
</div>
|
221
|
-
|
222
|
-
<div class="method-description">
|
223
|
-
</div>
|
224
|
-
</div>
|
225
|
-
|
226
|
-
<div id="method-M000037" class="method-detail">
|
227
|
-
<a name="M000037"></a>
|
228
|
-
|
229
|
-
<div class="method-heading">
|
230
|
-
<a href="Page.src/M000037.html" target="Code" class="method-signature"
|
231
|
-
onclick="popupCode('Page.src/M000037.html');return false;">
|
232
|
-
<span class="method-name">header</span><span class="method-args">()</span>
|
233
|
-
</a>
|
234
|
-
</div>
|
235
|
-
|
236
|
-
<div class="method-description">
|
237
|
-
</div>
|
238
|
-
</div>
|
239
|
-
|
240
|
-
<div id="method-M000040" class="method-detail">
|
241
|
-
<a name="M000040"></a>
|
242
|
-
|
243
|
-
<div class="method-heading">
|
244
|
-
<a href="Page.src/M000040.html" target="Code" class="method-signature"
|
245
|
-
onclick="popupCode('Page.src/M000040.html');return false;">
|
246
|
-
<span class="method-name">links</span><span class="method-args">()</span>
|
247
|
-
</a>
|
248
|
-
</div>
|
249
|
-
|
250
|
-
<div class="method-description">
|
251
|
-
</div>
|
252
|
-
</div>
|
253
|
-
|
254
|
-
<div id="method-M000043" class="method-detail">
|
255
|
-
<a name="M000043"></a>
|
256
|
-
|
257
|
-
<div class="method-heading">
|
258
|
-
<a href="Page.src/M000043.html" target="Code" class="method-signature"
|
259
|
-
onclick="popupCode('Page.src/M000043.html');return false;">
|
260
|
-
<span class="method-name">meta</span><span class="method-args">()</span>
|
261
|
-
</a>
|
262
|
-
</div>
|
263
|
-
|
264
|
-
<div class="method-description">
|
265
|
-
</div>
|
266
|
-
</div>
|
267
|
-
|
268
|
-
<div id="method-M000041" class="method-detail">
|
269
|
-
<a name="M000041"></a>
|
270
|
-
|
271
|
-
<div class="method-heading">
|
272
|
-
<a href="Page.src/M000041.html" target="Code" class="method-signature"
|
273
|
-
onclick="popupCode('Page.src/M000041.html');return false;">
|
274
|
-
<span class="method-name">root</span><span class="method-args">()</span>
|
275
|
-
</a>
|
276
|
-
</div>
|
277
|
-
|
278
|
-
<div class="method-description">
|
279
|
-
</div>
|
280
|
-
</div>
|
281
|
-
|
282
|
-
<div id="method-M000042" class="method-detail">
|
283
|
-
<a name="M000042"></a>
|
284
|
-
|
285
|
-
<div class="method-heading">
|
286
|
-
<a href="Page.src/M000042.html" target="Code" class="method-signature"
|
287
|
-
onclick="popupCode('Page.src/M000042.html');return false;">
|
288
|
-
<span class="method-name">watches</span><span class="method-args">()</span>
|
289
|
-
</a>
|
290
|
-
</div>
|
291
|
-
|
292
|
-
<div class="method-description">
|
293
|
-
<p>
|
294
|
-
This method watches out for a particular tag, and will call back to the
|
295
|
-
class specified for the tag in the watch_for_set method. See the example in
|
296
|
-
this class.
|
297
|
-
</p>
|
298
|
-
</div>
|
299
|
-
</div>
|
300
|
-
|
301
|
-
|
302
|
-
</div>
|
303
|
-
|
304
|
-
|
305
|
-
</div>
|
306
|
-
|
307
|
-
|
308
|
-
<div id="validator-badges">
|
309
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
310
|
-
</div>
|
311
|
-
|
312
|
-
</body>
|
313
|
-
</html>
|
@@ -1,18 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>new (WWW::Page)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/mechanize.rb, line 294</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">uri</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">cookies</span>=[], <span class="ruby-identifier">response</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">body</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">code</span>=<span class="ruby-keyword kw">nil</span>)
|
15
|
-
<span class="ruby-ivar">@uri</span>, <span class="ruby-ivar">@cookies</span>, <span class="ruby-ivar">@response</span>, <span class="ruby-ivar">@body</span>, <span class="ruby-ivar">@code</span> = <span class="ruby-identifier">uri</span>, <span class="ruby-identifier">cookies</span>, <span class="ruby-identifier">response</span>, <span class="ruby-identifier">body</span>, <span class="ruby-identifier">code</span>
|
16
|
-
<span class="ruby-keyword kw">end</span></pre>
|
17
|
-
</body>
|
18
|
-
</html>
|
@@ -1,18 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>header (WWW::Page)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/mechanize.rb, line 298</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">header</span>
|
15
|
-
<span class="ruby-ivar">@response</span>.<span class="ruby-identifier">header</span>
|
16
|
-
<span class="ruby-keyword kw">end</span></pre>
|
17
|
-
</body>
|
18
|
-
</html>
|
@@ -1,18 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>content_type (WWW::Page)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/mechanize.rb, line 302</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">content_type</span>
|
15
|
-
<span class="ruby-identifier">header</span>[<span class="ruby-value str">'Content-Type'</span>]
|
16
|
-
<span class="ruby-keyword kw">end</span></pre>
|
17
|
-
</body>
|
18
|
-
</html>
|