beway 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. data/Gemfile +1 -1
  2. data/README +7 -16
  3. data/README.rdoc +8 -20
  4. data/doc/Beway.html +136 -183
  5. data/doc/Beway/Auction.html +630 -816
  6. data/doc/Beway/AuctionParseError.html +139 -158
  7. data/doc/Beway/Bidder.html +384 -529
  8. data/doc/Beway/BidderError.html +139 -158
  9. data/doc/Beway/CliRunner.html +742 -818
  10. data/doc/Beway/EbayData.html +398 -451
  11. data/doc/Beway/EbayDataParseError.html +139 -158
  12. data/doc/Beway/InvalidUrlError.html +139 -158
  13. data/doc/README.html +129 -167
  14. data/doc/created.rid +6 -6
  15. data/doc/images/add.png +0 -0
  16. data/doc/images/brick.png +0 -0
  17. data/doc/images/brick_link.png +0 -0
  18. data/doc/images/bug.png +0 -0
  19. data/doc/images/bullet_black.png +0 -0
  20. data/doc/images/bullet_toggle_minus.png +0 -0
  21. data/doc/images/bullet_toggle_plus.png +0 -0
  22. data/doc/images/date.png +0 -0
  23. data/doc/images/delete.png +0 -0
  24. data/doc/images/find.png +0 -0
  25. data/doc/images/loadingAnimation.gif +0 -0
  26. data/doc/images/macFFBgHack.png +0 -0
  27. data/doc/images/package.png +0 -0
  28. data/doc/images/page_green.png +0 -0
  29. data/doc/images/page_white_text.png +0 -0
  30. data/doc/images/page_white_width.png +0 -0
  31. data/doc/images/plugin.png +0 -0
  32. data/doc/images/ruby.png +0 -0
  33. data/doc/images/tag_blue.png +0 -0
  34. data/doc/images/tag_green.png +0 -0
  35. data/doc/images/transparent.png +0 -0
  36. data/doc/images/wrench.png +0 -0
  37. data/doc/images/wrench_orange.png +0 -0
  38. data/doc/images/zoom.png +0 -0
  39. data/doc/index.html +134 -223
  40. data/doc/js/darkfish.js +153 -0
  41. data/doc/js/jquery.js +18 -0
  42. data/doc/js/navigation.js +142 -0
  43. data/doc/js/search.js +94 -0
  44. data/doc/js/search_index.js +1 -0
  45. data/doc/js/searcher.js +228 -0
  46. data/doc/lib/beway/auction_rb.html +1 -1
  47. data/doc/lib/beway/bidder_rb.html +1 -1
  48. data/doc/lib/beway/cli_runner_rb.html +1 -1
  49. data/doc/lib/beway/ebay_data_rb.html +1 -1
  50. data/doc/rdoc.css +310 -473
  51. data/doc/table_of_contents.html +154 -0
  52. data/lib/beway.rb +4 -0
  53. data/lib/beway/auction.rb +5 -7
  54. data/lib/beway/cli_runner.rb +2 -3
  55. data/lib/beway/ebay_data.rb +1 -1
  56. data/spec/auction_spec.rb +12 -1
  57. data/spec/bidder_spec.rb +19 -3
  58. data/spec/config.rb +2 -2
  59. data/spec/html/kodak-film-old.html +59 -0
  60. metadata +82 -97
@@ -1,160 +1,141 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
1
+ <!DOCTYPE html>
2
+
3
+ <html>
5
4
  <head>
6
- <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
7
-
8
- <title>Class: Beway::AuctionParseError</title>
9
-
10
- <link rel="stylesheet" href="../rdoc.css" type="text/css" media="screen" />
11
-
12
- <script src="../js/jquery.js" type="text/javascript"
13
- charset="utf-8"></script>
14
- <script src="../js/thickbox-compressed.js" type="text/javascript"
15
- charset="utf-8"></script>
16
- <script src="../js/quicksearch.js" type="text/javascript"
17
- charset="utf-8"></script>
18
- <script src="../js/darkfish.js" type="text/javascript"
19
- charset="utf-8"></script>
20
-
21
- </head>
22
- <body class="class">
23
-
24
- <div id="metadata">
25
- <div id="home-metadata">
26
- <div id="home-section" class="section">
27
- <h3 class="section-header">
28
- <a href="../index.html">Home</a>
29
- <a href="../index.html#classes">Classes</a>
30
- <a href="../index.html#methods">Methods</a>
31
- </h3>
32
- </div>
33
- </div>
34
-
35
- <div id="file-metadata">
36
- <div id="file-list-section" class="section">
37
- <h3 class="section-header">In Files</h3>
38
- <div class="section-body">
39
- <ul>
40
-
41
- <li><a href="../lib/beway/auction_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
42
- class="thickbox" title="lib/beway/auction.rb">lib/beway/auction.rb</a></li>
43
-
44
- </ul>
45
- </div>
46
- </div>
47
-
48
-
49
- </div>
50
-
51
- <div id="class-metadata">
52
-
53
- <!-- Parent Class -->
54
-
55
- <div id="parent-class-section" class="section">
56
- <h3 class="section-header">Parent</h3>
57
-
58
- <p class="link">StandardError</p>
59
-
60
- </div>
61
-
62
-
63
- <!-- Namespace Contents -->
64
-
65
-
66
- <!-- Method Quickref -->
67
-
68
-
69
- <!-- Included Modules -->
70
-
71
- </div>
72
-
73
- <div id="project-metadata">
74
-
75
-
76
- <div id="fileindex-section" class="section project-section">
77
- <h3 class="section-header">Files</h3>
78
- <ul>
79
-
80
- <li class="file"><a href="../README.html">README</a></li>
81
-
82
- </ul>
83
- </div>
84
-
85
-
86
- <div id="classindex-section" class="section project-section">
87
- <h3 class="section-header">Class Index
88
- <span class="search-toggle"><img src="../images/find.png"
89
- height="16" width="16" alt="[+]"
90
- title="show/hide quicksearch" /></span></h3>
91
- <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
92
- <fieldset>
93
- <legend>Quicksearch</legend>
94
- <input type="text" name="quicksearch" value=""
95
- class="quicksearch-field" />
96
- </fieldset>
97
- </form>
98
-
99
- <ul class="link-list">
100
-
101
- <li><a href="../Beway.html">Beway</a></li>
102
-
103
- <li><a href="../Beway/Auction.html">Beway::Auction</a></li>
104
-
105
- <li><a href="../Beway/AuctionParseError.html">Beway::AuctionParseError</a></li>
106
-
107
- <li><a href="../Beway/Bidder.html">Beway::Bidder</a></li>
108
-
109
- <li><a href="../Beway/BidderError.html">Beway::BidderError</a></li>
110
-
111
- <li><a href="../Beway/CliRunner.html">Beway::CliRunner</a></li>
112
-
113
- <li><a href="../Beway/EbayData.html">Beway::EbayData</a></li>
114
-
115
- <li><a href="../Beway/EbayDataParseError.html">Beway::EbayDataParseError</a></li>
116
-
117
- <li><a href="../Beway/InvalidUrlError.html">Beway::InvalidUrlError</a></li>
118
-
119
- </ul>
120
- <div id="no-class-search-results" style="display: none;">No matching classes.</div>
121
- </div>
122
-
123
-
124
- </div>
125
- </div>
126
-
127
- <div id="documentation">
128
- <h1 class="class">Beway::AuctionParseError</h1>
129
-
130
- <div id="description">
131
-
132
- </div>
133
-
134
- <!-- Constants -->
135
-
136
-
137
- <!-- Attributes -->
138
-
139
-
140
- <!-- Methods -->
141
-
142
-
143
- </div>
144
-
145
-
146
- <div id="rdoc-debugging-section-dump" class="debugging-section">
147
-
148
- <p>Disabled; run with --debug to generate this.</p>
149
-
150
- </div>
151
-
152
- <div id="validator-badges">
153
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
154
- <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
155
- Rdoc Generator</a> 1.1.6</small>.</p>
156
- </div>
157
-
158
- </body>
159
- </html>
5
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
6
+
7
+ <title>class Beway::AuctionParseError - RDoc Documentation</title>
8
+
9
+ <link type="text/css" media="screen" href="../rdoc.css" rel="stylesheet">
10
+
11
+ <script type="text/javascript">
12
+ var rdoc_rel_prefix = "../";
13
+ </script>
14
+
15
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
16
+ <script type="text/javascript" charset="utf-8" src="../js/navigation.js"></script>
17
+ <script type="text/javascript" charset="utf-8" src="../js/search_index.js"></script>
18
+ <script type="text/javascript" charset="utf-8" src="../js/search.js"></script>
19
+ <script type="text/javascript" charset="utf-8" src="../js/searcher.js"></script>
20
+ <script type="text/javascript" charset="utf-8" src="../js/darkfish.js"></script>
21
+
22
+
23
+ <body id="top" class="class">
24
+ <nav id="metadata">
25
+ <nav id="home-section" class="section">
26
+ <h3 class="section-header">
27
+ <a href="../index.html">Home</a>
28
+ <a href="../table_of_contents.html#classes">Classes</a>
29
+ <a href="../table_of_contents.html#methods">Methods</a>
30
+ </h3>
31
+ </nav>
32
+
33
+
34
+ <nav id="search-section" class="section project-section" class="initially-hidden">
35
+ <form action="#" method="get" accept-charset="utf-8">
36
+ <h3 class="section-header">
37
+ <input type="text" name="search" placeholder="Search" id="search-field"
38
+ title="Type to search, Up and Down to navigate, Enter to load">
39
+ </h3>
40
+ </form>
41
+
42
+ <ul id="search-results" class="initially-hidden"></ul>
43
+ </nav>
44
+
45
+
46
+ <div id="file-metadata">
47
+ <nav id="file-list-section" class="section">
48
+ <h3 class="section-header">Defined In</h3>
49
+ <ul>
50
+ <li>lib/beway/auction.rb
51
+ </ul>
52
+ </nav>
53
+
54
+
55
+ </div>
56
+
57
+ <div id="class-metadata">
58
+
59
+ <nav id="parent-class-section" class="section">
60
+ <h3 class="section-header">Parent</h3>
61
+
62
+ <p class="link">StandardError
63
+
64
+ </nav>
65
+
66
+
67
+
68
+ </div>
69
+
70
+ <div id="project-metadata">
71
+ <nav id="fileindex-section" class="section project-section">
72
+ <h3 class="section-header">Pages</h3>
73
+
74
+ <ul>
75
+
76
+ <li class="file"><a href="../README.html">README</a>
77
+
78
+ </ul>
79
+ </nav>
80
+
81
+ <nav id="classindex-section" class="section project-section">
82
+ <h3 class="section-header">Class and Module Index</h3>
83
+
84
+ <ul class="link-list">
85
+
86
+ <li><a href="../Beway.html">Beway</a>
87
+
88
+ <li><a href="../Beway/Auction.html">Beway::Auction</a>
89
+
90
+ <li><a href="../Beway/AuctionParseError.html">Beway::AuctionParseError</a>
91
+
92
+ <li><a href="../Beway/Bidder.html">Beway::Bidder</a>
93
+
94
+ <li><a href="../Beway/BidderError.html">Beway::BidderError</a>
95
+
96
+ <li><a href="../Beway/CliRunner.html">Beway::CliRunner</a>
97
+
98
+ <li><a href="../Beway/EbayData.html">Beway::EbayData</a>
99
+
100
+ <li><a href="../Beway/EbayDataParseError.html">Beway::EbayDataParseError</a>
101
+
102
+ <li><a href="../Beway/InvalidUrlError.html">Beway::InvalidUrlError</a>
103
+
104
+ </ul>
105
+ </nav>
106
+
107
+ </div>
108
+ </nav>
109
+
110
+ <div id="documentation">
111
+ <h1 class="class">class Beway::AuctionParseError</h1>
112
+
113
+ <div id="description" class="description">
114
+
115
+ </div><!-- description -->
116
+
117
+
118
+
119
+
120
+ <section id="5Buntitled-5D" class="documentation-section">
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+ <!-- Methods -->
130
+
131
+ </section><!-- 5Buntitled-5D -->
132
+
133
+ </div><!-- documentation -->
134
+
135
+
136
+ <footer id="validator-badges">
137
+ <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
138
+ <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
139
+ <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
140
+ </footer>
160
141
 
@@ -1,531 +1,386 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
1
+ <!DOCTYPE html>
2
+
3
+ <html>
5
4
  <head>
6
- <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
7
-
8
- <title>Class: Beway::Bidder</title>
9
-
10
- <link rel="stylesheet" href="../rdoc.css" type="text/css" media="screen" />
11
-
12
- <script src="../js/jquery.js" type="text/javascript"
13
- charset="utf-8"></script>
14
- <script src="../js/thickbox-compressed.js" type="text/javascript"
15
- charset="utf-8"></script>
16
- <script src="../js/quicksearch.js" type="text/javascript"
17
- charset="utf-8"></script>
18
- <script src="../js/darkfish.js" type="text/javascript"
19
- charset="utf-8"></script>
20
-
21
- </head>
22
- <body class="class">
23
-
24
- <div id="metadata">
25
- <div id="home-metadata">
26
- <div id="home-section" class="section">
27
- <h3 class="section-header">
28
- <a href="../index.html">Home</a>
29
- <a href="../index.html#classes">Classes</a>
30
- <a href="../index.html#methods">Methods</a>
31
- </h3>
32
- </div>
33
- </div>
34
-
35
- <div id="file-metadata">
36
- <div id="file-list-section" class="section">
37
- <h3 class="section-header">In Files</h3>
38
- <div class="section-body">
39
- <ul>
40
-
41
- <li><a href="../lib/beway/bidder_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
42
- class="thickbox" title="lib/beway/bidder.rb">lib/beway/bidder.rb</a></li>
43
-
44
- </ul>
45
- </div>
46
- </div>
47
-
48
-
49
- </div>
50
-
51
- <div id="class-metadata">
52
-
53
- <!-- Parent Class -->
54
-
55
- <div id="parent-class-section" class="section">
56
- <h3 class="section-header">Parent</h3>
57
-
58
- <p class="link">Object</p>
59
-
60
- </div>
61
-
62
-
63
- <!-- Namespace Contents -->
64
-
65
-
66
- <!-- Method Quickref -->
67
-
68
- <div id="method-list-section" class="section">
69
- <h3 class="section-header">Methods</h3>
70
- <ul class="link-list">
71
-
72
- <li><a href="#method-c-new">::new</a></li>
73
-
74
- <li><a href="#method-i-bid">#bid</a></li>
75
-
76
- <li><a href="#method-i-handle_login_page">#handle_login_page</a></li>
77
-
78
- <li><a href="#method-i-is_login_page%3F">#is_login_page?</a></li>
79
-
80
- <li><a href="#method-i-login">#login</a></li>
81
-
82
- </ul>
83
- </div>
84
-
85
-
86
- <!-- Included Modules -->
87
-
88
- </div>
89
-
90
- <div id="project-metadata">
91
-
92
-
93
- <div id="fileindex-section" class="section project-section">
94
- <h3 class="section-header">Files</h3>
95
- <ul>
96
-
97
- <li class="file"><a href="../README.html">README</a></li>
98
-
99
- </ul>
100
- </div>
101
-
102
-
103
- <div id="classindex-section" class="section project-section">
104
- <h3 class="section-header">Class Index
105
- <span class="search-toggle"><img src="../images/find.png"
106
- height="16" width="16" alt="[+]"
107
- title="show/hide quicksearch" /></span></h3>
108
- <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
109
- <fieldset>
110
- <legend>Quicksearch</legend>
111
- <input type="text" name="quicksearch" value=""
112
- class="quicksearch-field" />
113
- </fieldset>
114
- </form>
115
-
116
- <ul class="link-list">
117
-
118
- <li><a href="../Beway.html">Beway</a></li>
119
-
120
- <li><a href="../Beway/Auction.html">Beway::Auction</a></li>
121
-
122
- <li><a href="../Beway/AuctionParseError.html">Beway::AuctionParseError</a></li>
123
-
124
- <li><a href="../Beway/Bidder.html">Beway::Bidder</a></li>
125
-
126
- <li><a href="../Beway/BidderError.html">Beway::BidderError</a></li>
127
-
128
- <li><a href="../Beway/CliRunner.html">Beway::CliRunner</a></li>
129
-
130
- <li><a href="../Beway/EbayData.html">Beway::EbayData</a></li>
131
-
132
- <li><a href="../Beway/EbayDataParseError.html">Beway::EbayDataParseError</a></li>
133
-
134
- <li><a href="../Beway/InvalidUrlError.html">Beway::InvalidUrlError</a></li>
135
-
136
- </ul>
137
- <div id="no-class-search-results" style="display: none;">No matching classes.</div>
138
- </div>
139
-
140
-
141
- </div>
142
- </div>
143
-
144
- <div id="documentation">
145
- <h1 class="class">Beway::Bidder</h1>
146
-
147
- <div id="description">
148
- <p>
149
- <a href="Bidder.html">Bidder</a>
150
- </p>
151
- <p>
152
- Wrapper for Mechanize to perform actions on ebay
153
- </p>
154
-
155
- </div>
156
-
157
- <!-- Constants -->
158
-
159
- <div id="constants-list" class="section">
160
- <h3 class="section-header">Constants</h3>
161
- <dl>
162
-
163
- <dt><a name="EBAY_HOME">EBAY_HOME</a></dt>
164
-
165
- <dd class="description"></dd>
166
-
167
-
168
- </dl>
169
- </div>
170
-
171
-
172
- <!-- Attributes -->
173
-
174
- <div id="attribute-method-details" class="method-section section">
175
- <h3 class="section-header">Attributes</h3>
176
-
177
-
178
- <div id="username-attribute-method" class="method-detail">
179
- <a name="username"></a>
180
-
181
- <a name="username="></a>
182
-
183
- <div class="method-heading attribute-method-heading">
184
- <span class="method-name">username</span><span
185
- class="attribute-access-type">[RW]</span>
186
- </div>
187
-
188
- <div class="method-description">
189
-
190
-
191
-
192
- </div>
193
- </div>
194
-
195
- <div id="password-attribute-method" class="method-detail">
196
- <a name="password"></a>
197
-
198
- <a name="password="></a>
199
-
200
- <div class="method-heading attribute-method-heading">
201
- <span class="method-name">password</span><span
202
- class="attribute-access-type">[W]</span>
203
- </div>
204
-
205
- <div class="method-description">
206
-
207
-
208
-
209
- </div>
210
- </div>
211
-
212
- <div id="agent-attribute-method" class="method-detail">
213
- <a name="agent"></a>
214
-
215
- <div class="method-heading attribute-method-heading">
216
- <span class="method-name">agent</span><span
217
- class="attribute-access-type">[R]</span>
218
- </div>
219
-
220
- <div class="method-description">
221
-
222
-
223
-
224
- </div>
225
- </div>
226
-
227
- <div id="logged-in-attribute-method" class="method-detail">
228
- <a name="logged_in"></a>
229
-
230
- <div class="method-heading attribute-method-heading">
231
- <span class="method-name">logged_in</span><span
232
- class="attribute-access-type">[R]</span>
233
- </div>
234
-
235
- <div class="method-description">
236
-
237
-
238
-
239
- </div>
240
- </div>
241
-
242
- <div id="last-login-time-attribute-method" class="method-detail">
243
- <a name="last_login_time"></a>
244
-
245
- <div class="method-heading attribute-method-heading">
246
- <span class="method-name">last_login_time</span><span
247
- class="attribute-access-type">[R]</span>
248
- </div>
249
-
250
- <div class="method-description">
251
-
252
-
253
-
254
- </div>
255
- </div>
256
-
257
- </div>
258
-
259
-
260
- <!-- Methods -->
261
-
262
- <div id="public-class-method-details" class="method-section section">
263
- <h3 class="section-header">Public Class Methods</h3>
264
-
265
-
266
- <div id="new-method" class="method-detail ">
267
- <a name="method-c-new"></a>
268
-
269
- <div class="method-heading">
270
-
271
- <span class="method-name">new</span><span
272
- class="method-args">(username, password)</span>
273
- <span class="method-click-advice">click to toggle source</span>
274
-
275
- </div>
276
-
277
- <div class="method-description">
278
-
279
- <p>
280
- create a bidder with login credentials
281
- </p>
282
-
283
-
284
-
285
- <div class="method-source-code"
286
- id="new-source">
287
- <pre>
288
- <span class="ruby-comment cmt"># File lib/beway/bidder.rb, line 19</span>
289
- 19: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">username</span>, <span class="ruby-identifier">password</span>)
290
- 20: <span class="ruby-ivar">@username</span> = <span class="ruby-identifier">username</span>
291
- 21: <span class="ruby-ivar">@password</span> = <span class="ruby-identifier">password</span>
292
- 22: <span class="ruby-ivar">@agent</span> = <span class="ruby-constant">Mechanize</span>.<span class="ruby-identifier">new</span>
293
- 23: <span class="ruby-ivar">@logged_in</span> = <span class="ruby-keyword kw">false</span>
294
- 24: <span class="ruby-ivar">@last_login_time</span> = <span class="ruby-keyword kw">nil</span>
295
- 25: <span class="ruby-keyword kw">end</span></pre>
296
- </div>
297
-
298
- </div>
299
-
300
-
301
-
302
-
303
- </div>
304
-
305
-
306
- </div>
307
-
308
- <div id="public-instance-method-details" class="method-section section">
309
- <h3 class="section-header">Public Instance Methods</h3>
310
-
311
-
312
- <div id="bid-method" class="method-detail ">
313
- <a name="method-i-bid"></a>
314
-
315
- <div class="method-heading">
316
-
317
- <span class="method-name">bid</span><span
318
- class="method-args">(auction_url, amount)</span>
319
- <span class="method-click-advice">click to toggle source</span>
320
-
321
- </div>
322
-
323
- <div class="method-description">
324
-
325
- <p>
326
- bid amount on given auction
327
- </p>
328
-
329
-
330
-
331
- <div class="method-source-code"
332
- id="bid-source">
333
- <pre>
334
- <span class="ruby-comment cmt"># File lib/beway/bidder.rb, line 42</span>
335
- 42: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">bid</span>(<span class="ruby-identifier">auction_url</span>, <span class="ruby-identifier">amount</span>)
336
- 43:
337
- 44: <span class="ruby-comment cmt"># get auction</span>
338
- 45: <span class="ruby-identifier">auction_page</span> = <span class="ruby-ivar">@agent</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">auction_url</span>)
339
- 46:
340
- 47: <span class="ruby-comment cmt"># get the bid form</span>
341
- 48: <span class="ruby-identifier">forms</span> = <span class="ruby-identifier">auction_page</span>.<span class="ruby-identifier">forms_with</span>( <span class="ruby-value">:action</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-regexp re">/http:\/\/offer\.ebay\.com\//</span> )
342
- 49: <span class="ruby-identifier">raise</span> <span class="ruby-constant">BidderError</span>, <span class="ruby-value str">&quot;Couldn't find auction bid form&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">forms</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">!=</span> <span class="ruby-value">1</span>
343
- 50: <span class="ruby-identifier">bid_form</span> = <span class="ruby-identifier">forms</span>[<span class="ruby-value">0</span>]
344
- 51:
345
- 52: <span class="ruby-comment cmt"># fill in, submit bid form</span>
346
- 53: <span class="ruby-identifier">bid_form</span>.<span class="ruby-identifier">maxbid</span> = <span class="ruby-identifier">amount</span>
347
- 54: <span class="ruby-identifier">bid_response</span> = <span class="ruby-identifier">bid_form</span>.<span class="ruby-identifier">submit</span>
348
- 55:
349
- 56: <span class="ruby-comment cmt"># if given a login page, do it and get redirected to confirm bid</span>
350
- 57: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">is_login_page?</span>(<span class="ruby-identifier">bid_response</span>)
351
- 58: <span class="ruby-identifier">bid_response</span> = <span class="ruby-identifier">handle_login_page</span>(<span class="ruby-identifier">bid_response</span>)
352
- 59: <span class="ruby-keyword kw">end</span>
353
- 60:
354
- 61: <span class="ruby-comment cmt"># get confirm bid form</span>
355
- 62: <span class="ruby-identifier">forms</span> = <span class="ruby-identifier">bid_response</span>.<span class="ruby-identifier">forms_with</span>( <span class="ruby-value">:action</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'http://offer.ebay.com/ws/eBayISAPI.dll'</span> )
356
- 63: <span class="ruby-identifier">raise</span> <span class="ruby-constant">BidderError</span>, <span class="ruby-value str">&quot;Couldn't find confirm bid form&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">forms</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">!=</span> <span class="ruby-value">1</span>
357
- 64: <span class="ruby-identifier">confirm_form</span> = <span class="ruby-identifier">forms</span>[<span class="ruby-value">0</span>]
358
- 65:
359
- 66: <span class="ruby-comment cmt"># click confirm button</span>
360
- 67: <span class="ruby-identifier">confirm_button</span> = <span class="ruby-identifier">confirm_form</span>.<span class="ruby-identifier">button_with</span>( <span class="ruby-value">:value</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'Confirm Bid'</span> )
361
- 68: <span class="ruby-identifier">raise</span> <span class="ruby-constant">BidderError</span>, <span class="ruby-value str">&quot;Couldn't find confirm bid button&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">confirm_button</span>
362
- 69: <span class="ruby-identifier">confirm_response</span> = <span class="ruby-identifier">confirm_form</span>.<span class="ruby-identifier">submit</span>( <span class="ruby-identifier">confirm_button</span> )
363
- 70:
364
- 71: <span class="ruby-identifier">confirm_response</span>
365
- 72: <span class="ruby-keyword kw">end</span></pre>
366
- </div>
367
-
368
- </div>
369
-
370
-
371
-
372
-
373
- </div>
374
-
375
-
376
- <div id="login-method" class="method-detail ">
377
- <a name="method-i-login"></a>
378
-
379
- <div class="method-heading">
380
-
381
- <span class="method-name">login</span><span
382
- class="method-args">()</span>
383
- <span class="method-click-advice">click to toggle source</span>
384
-
385
- </div>
386
-
387
- <div class="method-description">
388
-
389
- <p>
390
- log user in with credentials. returns boolean representing success
391
- </p>
392
-
393
-
394
-
395
- <div class="method-source-code"
396
- id="login-source">
397
- <pre>
398
- <span class="ruby-comment cmt"># File lib/beway/bidder.rb, line 29</span>
399
- 29: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">login</span>
400
- 30: <span class="ruby-identifier">ebay_home_page</span> = <span class="ruby-ivar">@agent</span>.<span class="ruby-identifier">get</span>(<span class="ruby-constant">EBAY_HOME</span>)
401
- 31:
402
- 32: <span class="ruby-identifier">sign_in_link</span> = <span class="ruby-identifier">ebay_home_page</span>.<span class="ruby-identifier">link_with</span>( <span class="ruby-value">:text</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'Sign in'</span> )
403
- 33: <span class="ruby-identifier">raise</span> <span class="ruby-constant">BidderError</span>, <span class="ruby-value str">&quot;Couldn't find sign in link&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">sign_in_link</span>
404
- 34: <span class="ruby-identifier">login_page</span> = <span class="ruby-identifier">sign_in_link</span>.<span class="ruby-identifier">click</span>
405
- 35:
406
- 36: <span class="ruby-identifier">handle_login_page</span>(<span class="ruby-identifier">login_page</span>)
407
- 37:
408
- 38: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@logged_in</span>
409
- 39: <span class="ruby-keyword kw">end</span></pre>
410
- </div>
411
-
412
- </div>
413
-
414
-
415
-
416
-
417
- </div>
418
-
419
-
420
- </div>
421
-
422
- <div id="private-instance-method-details" class="method-section section">
423
- <h3 class="section-header">Private Instance Methods</h3>
424
-
425
-
426
- <div id="handle-login-page-method" class="method-detail ">
427
- <a name="method-i-handle_login_page"></a>
428
-
429
- <div class="method-heading">
430
-
431
- <span class="method-name">handle_login_page</span><span
432
- class="method-args">(login_page)</span>
433
- <span class="method-click-advice">click to toggle source</span>
434
-
435
- </div>
436
-
437
- <div class="method-description">
438
-
439
- <p>
440
- log into ebay as prompted by login_page
441
- </p>
442
-
443
-
444
-
445
- <div class="method-source-code"
446
- id="handle-login-page-source">
447
- <pre>
448
- <span class="ruby-comment cmt"># File lib/beway/bidder.rb, line 86</span>
449
- 86: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">handle_login_page</span>(<span class="ruby-identifier">login_page</span>)
450
- 87: <span class="ruby-identifier">login_form</span> = <span class="ruby-identifier">login_page</span>.<span class="ruby-identifier">form_with</span>( <span class="ruby-value">:name</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'SignInForm'</span>)
451
- 88: <span class="ruby-identifier">raise</span> <span class="ruby-constant">BidderError</span>, <span class="ruby-value str">&quot;Couldn't find login form&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">login_form</span>
452
- 89: <span class="ruby-identifier">login_form</span>.<span class="ruby-identifier">userid</span> = <span class="ruby-ivar">@username</span>
453
- 90: <span class="ruby-identifier">login_form</span>.<span class="ruby-identifier">pass</span> = <span class="ruby-ivar">@password</span>
454
- 91: <span class="ruby-identifier">login_response</span> = <span class="ruby-identifier">login_form</span>.<span class="ruby-identifier">submit</span>
455
- 92:
456
- 93: <span class="ruby-ivar">@logged_in</span> = <span class="ruby-identifier">login_response</span>.<span class="ruby-identifier">search</span>(<span class="ruby-value str">'form#SignInForm'</span>).<span class="ruby-identifier">empty?</span>
457
- 94: <span class="ruby-ivar">@last_login_time</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@logged_in</span>
458
- 95:
459
- 96: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">login_response</span>
460
- 97: <span class="ruby-keyword kw">end</span></pre>
461
- </div>
462
-
463
- </div>
464
-
465
-
466
-
467
-
468
- </div>
469
-
470
-
471
- <div id="is-login-page--method" class="method-detail ">
472
- <a name="method-i-is_login_page%3F"></a>
473
-
474
- <div class="method-heading">
475
-
476
- <span class="method-name">is_login_page?</span><span
477
- class="method-args">(page)</span>
478
- <span class="method-click-advice">click to toggle source</span>
479
-
480
- </div>
481
-
482
- <div class="method-description">
483
-
484
- <p>
485
- is page a login page?
486
- </p>
487
-
488
-
489
-
490
- <div class="method-source-code"
491
- id="is-login-page--source">
492
- <pre>
493
- <span class="ruby-comment cmt"># File lib/beway/bidder.rb, line 77</span>
494
- 77: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">is_login_page?</span>(<span class="ruby-identifier">page</span>)
495
- 78: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">page</span>.<span class="ruby-identifier">form_with</span>( <span class="ruby-value">:name</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'SignInForm'</span>)
496
- 79: <span class="ruby-keyword kw">true</span>
497
- 80: <span class="ruby-keyword kw">else</span>
498
- 81: <span class="ruby-keyword kw">false</span>
499
- 82: <span class="ruby-keyword kw">end</span>
500
- 83: <span class="ruby-keyword kw">end</span></pre>
501
- </div>
502
-
503
- </div>
504
-
505
-
506
-
507
-
508
- </div>
509
-
510
-
511
- </div>
512
-
513
-
514
- </div>
515
-
516
-
517
- <div id="rdoc-debugging-section-dump" class="debugging-section">
518
-
519
- <p>Disabled; run with --debug to generate this.</p>
520
-
521
- </div>
522
-
523
- <div id="validator-badges">
524
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
525
- <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
526
- Rdoc Generator</a> 1.1.6</small>.</p>
527
- </div>
528
-
529
- </body>
530
- </html>
5
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
6
+
7
+ <title>class Beway::Bidder - RDoc Documentation</title>
8
+
9
+ <link type="text/css" media="screen" href="../rdoc.css" rel="stylesheet">
10
+
11
+ <script type="text/javascript">
12
+ var rdoc_rel_prefix = "../";
13
+ </script>
14
+
15
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
16
+ <script type="text/javascript" charset="utf-8" src="../js/navigation.js"></script>
17
+ <script type="text/javascript" charset="utf-8" src="../js/search_index.js"></script>
18
+ <script type="text/javascript" charset="utf-8" src="../js/search.js"></script>
19
+ <script type="text/javascript" charset="utf-8" src="../js/searcher.js"></script>
20
+ <script type="text/javascript" charset="utf-8" src="../js/darkfish.js"></script>
21
+
22
+
23
+ <body id="top" class="class">
24
+ <nav id="metadata">
25
+ <nav id="home-section" class="section">
26
+ <h3 class="section-header">
27
+ <a href="../index.html">Home</a>
28
+ <a href="../table_of_contents.html#classes">Classes</a>
29
+ <a href="../table_of_contents.html#methods">Methods</a>
30
+ </h3>
31
+ </nav>
32
+
33
+
34
+ <nav id="search-section" class="section project-section" class="initially-hidden">
35
+ <form action="#" method="get" accept-charset="utf-8">
36
+ <h3 class="section-header">
37
+ <input type="text" name="search" placeholder="Search" id="search-field"
38
+ title="Type to search, Up and Down to navigate, Enter to load">
39
+ </h3>
40
+ </form>
41
+
42
+ <ul id="search-results" class="initially-hidden"></ul>
43
+ </nav>
44
+
45
+
46
+ <div id="file-metadata">
47
+ <nav id="file-list-section" class="section">
48
+ <h3 class="section-header">Defined In</h3>
49
+ <ul>
50
+ <li>lib/beway/bidder.rb
51
+ </ul>
52
+ </nav>
53
+
54
+
55
+ </div>
56
+
57
+ <div id="class-metadata">
58
+
59
+ <nav id="parent-class-section" class="section">
60
+ <h3 class="section-header">Parent</h3>
61
+
62
+ <p class="link">Object
63
+
64
+ </nav>
65
+
66
+
67
+ <!-- Method Quickref -->
68
+ <nav id="method-list-section" class="section">
69
+ <h3 class="section-header">Methods</h3>
70
+
71
+ <ul class="link-list">
72
+
73
+ <li><a href="#method-c-new">::new</a>
74
+
75
+ <li><a href="#method-i-bid">#bid</a>
76
+
77
+ <li><a href="#method-i-login">#login</a>
78
+
79
+ </ul>
80
+ </nav>
81
+
82
+ </div>
83
+
84
+ <div id="project-metadata">
85
+ <nav id="fileindex-section" class="section project-section">
86
+ <h3 class="section-header">Pages</h3>
87
+
88
+ <ul>
89
+
90
+ <li class="file"><a href="../README.html">README</a>
91
+
92
+ </ul>
93
+ </nav>
94
+
95
+ <nav id="classindex-section" class="section project-section">
96
+ <h3 class="section-header">Class and Module Index</h3>
97
+
98
+ <ul class="link-list">
99
+
100
+ <li><a href="../Beway.html">Beway</a>
101
+
102
+ <li><a href="../Beway/Auction.html">Beway::Auction</a>
103
+
104
+ <li><a href="../Beway/AuctionParseError.html">Beway::AuctionParseError</a>
105
+
106
+ <li><a href="../Beway/Bidder.html">Beway::Bidder</a>
107
+
108
+ <li><a href="../Beway/BidderError.html">Beway::BidderError</a>
109
+
110
+ <li><a href="../Beway/CliRunner.html">Beway::CliRunner</a>
111
+
112
+ <li><a href="../Beway/EbayData.html">Beway::EbayData</a>
113
+
114
+ <li><a href="../Beway/EbayDataParseError.html">Beway::EbayDataParseError</a>
115
+
116
+ <li><a href="../Beway/InvalidUrlError.html">Beway::InvalidUrlError</a>
117
+
118
+ </ul>
119
+ </nav>
120
+
121
+ </div>
122
+ </nav>
123
+
124
+ <div id="documentation">
125
+ <h1 class="class">class Beway::Bidder</h1>
126
+
127
+ <div id="description" class="description">
128
+
129
+ <p><a href="Bidder.html">Bidder</a></p>
130
+
131
+ <p>Wrapper for Mechanize to perform actions on ebay</p>
132
+
133
+ </div><!-- description -->
134
+
135
+
136
+
137
+
138
+ <section id="5Buntitled-5D" class="documentation-section">
139
+
140
+
141
+
142
+
143
+
144
+ <!-- Constants -->
145
+ <section id="constants-list" class="section">
146
+ <h3 class="section-header">Constants</h3>
147
+ <dl>
148
+
149
+ <dt id="EBAY_HOME">EBAY_HOME
150
+
151
+ <dd class="description">
152
+
153
+
154
+ </dl>
155
+ </section>
156
+
157
+
158
+
159
+ <!-- Attributes -->
160
+ <section id="attribute-method-details" class="method-section section">
161
+ <h3 class="section-header">Attributes</h3>
162
+
163
+
164
+ <div id="attribute-i-agent" class="method-detail">
165
+ <div class="method-heading attribute-method-heading">
166
+ <span class="method-name">agent</span><span
167
+ class="attribute-access-type">[R]</span>
168
+ </div>
169
+
170
+ <div class="method-description">
171
+
172
+
173
+
174
+ </div>
175
+ </div>
176
+
177
+ <div id="attribute-i-last_login_time" class="method-detail">
178
+ <div class="method-heading attribute-method-heading">
179
+ <span class="method-name">last_login_time</span><span
180
+ class="attribute-access-type">[R]</span>
181
+ </div>
182
+
183
+ <div class="method-description">
184
+
185
+
186
+
187
+ </div>
188
+ </div>
189
+
190
+ <div id="attribute-i-logged_in" class="method-detail">
191
+ <div class="method-heading attribute-method-heading">
192
+ <span class="method-name">logged_in</span><span
193
+ class="attribute-access-type">[R]</span>
194
+ </div>
195
+
196
+ <div class="method-description">
197
+
198
+
199
+
200
+ </div>
201
+ </div>
202
+
203
+ <div id="attribute-i-password" class="method-detail">
204
+ <div class="method-heading attribute-method-heading">
205
+ <span class="method-name">password</span><span
206
+ class="attribute-access-type">[W]</span>
207
+ </div>
208
+
209
+ <div class="method-description">
210
+
211
+
212
+
213
+ </div>
214
+ </div>
215
+
216
+ <div id="attribute-i-username" class="method-detail">
217
+ <div class="method-heading attribute-method-heading">
218
+ <span class="method-name">username</span><span
219
+ class="attribute-access-type">[RW]</span>
220
+ </div>
221
+
222
+ <div class="method-description">
223
+
224
+
225
+
226
+ </div>
227
+ </div>
228
+
229
+ </section><!-- attribute-method-details -->
230
+
231
+
232
+ <!-- Methods -->
233
+
234
+ <section id="public-class-5Buntitled-5D-method-details" class="method-section section">
235
+ <h3 class="section-header">Public Class Methods</h3>
236
+
237
+
238
+ <div id="method-c-new" class="method-detail ">
239
+
240
+ <div class="method-heading">
241
+ <span class="method-name">new</span><span
242
+ class="method-args">(username, password)</span>
243
+ <span class="method-click-advice">click to toggle source</span>
244
+ </div>
245
+
246
+
247
+ <div class="method-description">
248
+
249
+ <p>create a bidder with login credentials</p>
250
+
251
+
252
+
253
+ <div class="method-source-code" id="new-source">
254
+ <pre><span class="ruby-comment"># File lib/beway/bidder.rb, line 19</span>
255
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">username</span>, <span class="ruby-identifier">password</span>)
256
+ <span class="ruby-ivar">@username</span> = <span class="ruby-identifier">username</span>
257
+ <span class="ruby-ivar">@password</span> = <span class="ruby-identifier">password</span>
258
+ <span class="ruby-ivar">@agent</span> = <span class="ruby-constant">Mechanize</span>.<span class="ruby-identifier">new</span>
259
+ <span class="ruby-ivar">@logged_in</span> = <span class="ruby-keyword">false</span>
260
+ <span class="ruby-ivar">@last_login_time</span> = <span class="ruby-keyword">nil</span>
261
+ <span class="ruby-keyword">end</span></pre>
262
+ </div><!-- new-source -->
263
+
264
+ </div>
265
+
266
+
267
+
268
+
269
+ </div><!-- new-method -->
270
+
271
+
272
+ </section><!-- public-class-method-details -->
273
+
274
+ <section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
275
+ <h3 class="section-header">Public Instance Methods</h3>
276
+
277
+
278
+ <div id="method-i-bid" class="method-detail ">
279
+
280
+ <div class="method-heading">
281
+ <span class="method-name">bid</span><span
282
+ class="method-args">(auction_url, amount)</span>
283
+ <span class="method-click-advice">click to toggle source</span>
284
+ </div>
285
+
286
+
287
+ <div class="method-description">
288
+
289
+ <p>bid amount on given auction</p>
290
+
291
+
292
+
293
+ <div class="method-source-code" id="bid-source">
294
+ <pre><span class="ruby-comment"># File lib/beway/bidder.rb, line 42</span>
295
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">bid</span>(<span class="ruby-identifier">auction_url</span>, <span class="ruby-identifier">amount</span>)
296
+
297
+ <span class="ruby-comment"># get auction</span>
298
+ <span class="ruby-identifier">auction_page</span> = <span class="ruby-ivar">@agent</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">auction_url</span>)
299
+
300
+ <span class="ruby-comment"># get the bid form</span>
301
+ <span class="ruby-identifier">forms</span> = <span class="ruby-identifier">auction_page</span>.<span class="ruby-identifier">forms_with</span>( <span class="ruby-value">:action</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-regexp">%rhttp:\/\/offer\.ebay\.com\//</span> )
302
+ <span class="ruby-identifier">raise</span> <span class="ruby-constant">BidderError</span>, <span class="ruby-string">&quot;Couldn't find auction bid form&quot;</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">forms</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">!=</span> <span class="ruby-value">1</span>
303
+ <span class="ruby-identifier">bid_form</span> = <span class="ruby-identifier">forms</span>[<span class="ruby-value">0</span>]
304
+
305
+ <span class="ruby-comment"># fill in, submit bid form</span>
306
+ <span class="ruby-identifier">bid_form</span>.<span class="ruby-identifier">maxbid</span> = <span class="ruby-identifier">amount</span>
307
+ <span class="ruby-identifier">bid_response</span> = <span class="ruby-identifier">bid_form</span>.<span class="ruby-identifier">submit</span>
308
+
309
+ <span class="ruby-comment"># if given a login page, do it and get redirected to confirm bid</span>
310
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">is_login_page?</span>(<span class="ruby-identifier">bid_response</span>)
311
+ <span class="ruby-identifier">bid_response</span> = <span class="ruby-identifier">handle_login_page</span>(<span class="ruby-identifier">bid_response</span>)
312
+ <span class="ruby-keyword">end</span>
313
+
314
+ <span class="ruby-comment"># get confirm bid form</span>
315
+ <span class="ruby-identifier">forms</span> = <span class="ruby-identifier">bid_response</span>.<span class="ruby-identifier">forms_with</span>( <span class="ruby-value">:action</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'http://offer.ebay.com/ws/eBayISAPI.dll'</span> )
316
+ <span class="ruby-identifier">raise</span> <span class="ruby-constant">BidderError</span>, <span class="ruby-string">&quot;Couldn't find confirm bid form&quot;</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">forms</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">!=</span> <span class="ruby-value">1</span>
317
+ <span class="ruby-identifier">confirm_form</span> = <span class="ruby-identifier">forms</span>[<span class="ruby-value">0</span>]
318
+
319
+ <span class="ruby-comment"># click confirm button</span>
320
+ <span class="ruby-identifier">confirm_button</span> = <span class="ruby-identifier">confirm_form</span>.<span class="ruby-identifier">button_with</span>( <span class="ruby-value">:value</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'Confirm Bid'</span> )
321
+ <span class="ruby-identifier">raise</span> <span class="ruby-constant">BidderError</span>, <span class="ruby-string">&quot;Couldn't find confirm bid button&quot;</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">confirm_button</span>
322
+ <span class="ruby-identifier">confirm_response</span> = <span class="ruby-identifier">confirm_form</span>.<span class="ruby-identifier">submit</span>( <span class="ruby-identifier">confirm_button</span> )
323
+
324
+ <span class="ruby-identifier">confirm_response</span>
325
+ <span class="ruby-keyword">end</span></pre>
326
+ </div><!-- bid-source -->
327
+
328
+ </div>
329
+
330
+
331
+
332
+
333
+ </div><!-- bid-method -->
334
+
335
+
336
+ <div id="method-i-login" class="method-detail ">
337
+
338
+ <div class="method-heading">
339
+ <span class="method-name">login</span><span
340
+ class="method-args">()</span>
341
+ <span class="method-click-advice">click to toggle source</span>
342
+ </div>
343
+
344
+
345
+ <div class="method-description">
346
+
347
+ <p>log user in with credentials. returns boolean representing success</p>
348
+
349
+
350
+
351
+ <div class="method-source-code" id="login-source">
352
+ <pre><span class="ruby-comment"># File lib/beway/bidder.rb, line 29</span>
353
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">login</span>
354
+ <span class="ruby-identifier">ebay_home_page</span> = <span class="ruby-ivar">@agent</span>.<span class="ruby-identifier">get</span>(<span class="ruby-constant">EBAY_HOME</span>)
355
+
356
+ <span class="ruby-identifier">sign_in_link</span> = <span class="ruby-identifier">ebay_home_page</span>.<span class="ruby-identifier">link_with</span>( <span class="ruby-value">:text</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'Sign in'</span> )
357
+ <span class="ruby-identifier">raise</span> <span class="ruby-constant">BidderError</span>, <span class="ruby-string">&quot;Couldn't find sign in link&quot;</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">sign_in_link</span>
358
+ <span class="ruby-identifier">login_page</span> = <span class="ruby-identifier">sign_in_link</span>.<span class="ruby-identifier">click</span>
359
+
360
+ <span class="ruby-identifier">handle_login_page</span>(<span class="ruby-identifier">login_page</span>)
361
+
362
+ <span class="ruby-keyword">return</span> <span class="ruby-ivar">@logged_in</span>
363
+ <span class="ruby-keyword">end</span></pre>
364
+ </div><!-- login-source -->
365
+
366
+ </div>
367
+
368
+
369
+
370
+
371
+ </div><!-- login-method -->
372
+
373
+
374
+ </section><!-- public-instance-method-details -->
375
+
376
+ </section><!-- 5Buntitled-5D -->
377
+
378
+ </div><!-- documentation -->
379
+
380
+
381
+ <footer id="validator-badges">
382
+ <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
383
+ <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
384
+ <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
385
+ </footer>
531
386