cw 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardoc/checksums +33 -0
- data/.yardoc/object_types +0 -0
- data/.yardoc/objects/root.dat +0 -0
- data/.yardoc/proxy_types +0 -0
- data/cw.gemspec +1 -1
- data/doc/Alphabet.html +433 -0
- data/doc/AudioPlayer.html +805 -0
- data/doc/Book.html +3134 -0
- data/doc/BookDetails.html +664 -0
- data/doc/CW.html +849 -0
- data/doc/CWThreads.html +514 -0
- data/doc/Cl.html +1125 -0
- data/doc/CurrentWord.html +636 -0
- data/doc/CwDsl.html +1871 -0
- data/doc/CwEncoding.html +329 -0
- data/doc/FileDetails.html +236 -0
- data/doc/KeyInput.html +758 -0
- data/doc/MonitorKeys.html +482 -0
- data/doc/Numbers.html +433 -0
- data/doc/Params.html +352 -0
- data/doc/Print.html +1130 -0
- data/doc/Print/ProgressPrint.html +419 -0
- data/doc/Process.html +202 -0
- data/doc/Progress.html +337 -0
- data/doc/Randomize.html +959 -0
- data/doc/RepeatWord.html +816 -0
- data/doc/Rss.html +630 -0
- data/doc/Sentence.html +1457 -0
- data/doc/Spoken.html +215 -0
- data/doc/Str.html +771 -0
- data/doc/Stream.html +1401 -0
- data/doc/TestLetters.html +586 -0
- data/doc/TestWords.html +646 -0
- data/doc/Tester.html +3064 -0
- data/doc/Timing.html +1244 -0
- data/doc/ToneGenerator.html +2111 -0
- data/doc/Voice.html +273 -0
- data/doc/Words.html +1750 -0
- data/doc/_index.html +376 -0
- data/doc/class_list.html +58 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +57 -0
- data/doc/css/style.css +339 -0
- data/doc/file.README.html +148 -0
- data/doc/file_list.html +60 -0
- data/doc/frames.html +26 -0
- data/doc/index.html +148 -0
- data/doc/js/app.js +219 -0
- data/doc/js/full_list.js +181 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +2697 -0
- data/doc/monitor.html +435 -0
- data/doc/top-level-namespace.html +114 -0
- metadata +53 -1
data/doc/Rss.html
ADDED
@@ -0,0 +1,630 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
+
<title>
|
7
|
+
Class: Rss
|
8
|
+
|
9
|
+
— Documentation by YARD 0.8.7.6
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
hasFrames = window.top.frames.main ? true : false;
|
19
|
+
relpath = '';
|
20
|
+
framesUrl = "frames.html#!Rss.html";
|
21
|
+
</script>
|
22
|
+
|
23
|
+
|
24
|
+
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
25
|
+
|
26
|
+
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
27
|
+
|
28
|
+
|
29
|
+
</head>
|
30
|
+
<body>
|
31
|
+
<div id="header">
|
32
|
+
<div id="menu">
|
33
|
+
|
34
|
+
<a href="_index.html">Index (R)</a> »
|
35
|
+
|
36
|
+
|
37
|
+
<span class="title">Rss</span>
|
38
|
+
|
39
|
+
|
40
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
41
|
+
</div>
|
42
|
+
|
43
|
+
<div id="search">
|
44
|
+
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
46
|
+
href="class_list.html">
|
47
|
+
Class List
|
48
|
+
</a>
|
49
|
+
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
51
|
+
href="method_list.html">
|
52
|
+
Method List
|
53
|
+
</a>
|
54
|
+
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
56
|
+
href="file_list.html">
|
57
|
+
File List
|
58
|
+
</a>
|
59
|
+
|
60
|
+
</div>
|
61
|
+
<div class="clear"></div>
|
62
|
+
</div>
|
63
|
+
|
64
|
+
<iframe id="search_frame"></iframe>
|
65
|
+
|
66
|
+
<div id="content"><h1>Class: Rss
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
</h1>
|
71
|
+
|
72
|
+
<dl class="box">
|
73
|
+
|
74
|
+
<dt class="r1">Inherits:</dt>
|
75
|
+
<dd class="r1">
|
76
|
+
<span class="inheritName">Object</span>
|
77
|
+
|
78
|
+
<ul class="fullTree">
|
79
|
+
<li>Object</li>
|
80
|
+
|
81
|
+
<li class="next">Rss</li>
|
82
|
+
|
83
|
+
</ul>
|
84
|
+
<a href="#" class="inheritanceTree">show all</a>
|
85
|
+
|
86
|
+
</dd>
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
<dt class="r2 last">Defined in:</dt>
|
97
|
+
<dd class="r2 last">lib/cw/rss.rb</dd>
|
98
|
+
|
99
|
+
</dl>
|
100
|
+
<div class="clear"></div>
|
101
|
+
|
102
|
+
<h2>Overview</h2><div class="docstring">
|
103
|
+
<div class="discussion">
|
104
|
+
|
105
|
+
<p>class Rss</p>
|
106
|
+
|
107
|
+
|
108
|
+
</div>
|
109
|
+
</div>
|
110
|
+
<div class="tags">
|
111
|
+
|
112
|
+
|
113
|
+
</div>
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
<h2>
|
122
|
+
Instance Method Summary
|
123
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
124
|
+
</h2>
|
125
|
+
|
126
|
+
<ul class="summary">
|
127
|
+
|
128
|
+
<li class="public ">
|
129
|
+
<span class="summary_signature">
|
130
|
+
|
131
|
+
<a href="#article_index-instance_method" title="#article_index (instance method)">- (Object) <strong>article_index</strong> </a>
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
</span>
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
146
|
+
|
147
|
+
</li>
|
148
|
+
|
149
|
+
|
150
|
+
<li class="public ">
|
151
|
+
<span class="summary_signature">
|
152
|
+
|
153
|
+
<a href="#cw_chars-instance_method" title="#cw_chars (instance method)">- (Object) <strong>cw_chars</strong>(chr) </a>
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
</span>
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
168
|
+
|
169
|
+
</li>
|
170
|
+
|
171
|
+
|
172
|
+
<li class="public ">
|
173
|
+
<span class="summary_signature">
|
174
|
+
|
175
|
+
<a href="#exclude_non_cw_chars-instance_method" title="#exclude_non_cw_chars (instance method)">- (Object) <strong>exclude_non_cw_chars</strong>(word) </a>
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
</span>
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
190
|
+
|
191
|
+
</li>
|
192
|
+
|
193
|
+
|
194
|
+
<li class="public ">
|
195
|
+
<span class="summary_signature">
|
196
|
+
|
197
|
+
<a href="#inc_article_index-instance_method" title="#inc_article_index (instance method)">- (Object) <strong>inc_article_index</strong> </a>
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
</span>
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
212
|
+
|
213
|
+
</li>
|
214
|
+
|
215
|
+
|
216
|
+
<li class="public ">
|
217
|
+
<span class="summary_signature">
|
218
|
+
|
219
|
+
<a href="#next_article-instance_method" title="#next_article (instance method)">- (Object) <strong>next_article</strong> </a>
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
</span>
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
234
|
+
|
235
|
+
</li>
|
236
|
+
|
237
|
+
|
238
|
+
<li class="public ">
|
239
|
+
<span class="summary_signature">
|
240
|
+
|
241
|
+
<a href="#read_rss-instance_method" title="#read_rss (instance method)">- (Object) <strong>read_rss</strong>(src, show_count = 3) </a>
|
242
|
+
|
243
|
+
|
244
|
+
|
245
|
+
</span>
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
256
|
+
|
257
|
+
</li>
|
258
|
+
|
259
|
+
|
260
|
+
<li class="public ">
|
261
|
+
<span class="summary_signature">
|
262
|
+
|
263
|
+
<a href="#source-instance_method" title="#source (instance method)">- (Object) <strong>source</strong>(src) </a>
|
264
|
+
|
265
|
+
|
266
|
+
|
267
|
+
</span>
|
268
|
+
|
269
|
+
|
270
|
+
|
271
|
+
|
272
|
+
|
273
|
+
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
278
|
+
|
279
|
+
</li>
|
280
|
+
|
281
|
+
|
282
|
+
<li class="public ">
|
283
|
+
<span class="summary_signature">
|
284
|
+
|
285
|
+
<a href="#sources-instance_method" title="#sources (instance method)">- (Object) <strong>sources</strong> </a>
|
286
|
+
|
287
|
+
|
288
|
+
|
289
|
+
</span>
|
290
|
+
|
291
|
+
|
292
|
+
|
293
|
+
|
294
|
+
|
295
|
+
|
296
|
+
|
297
|
+
|
298
|
+
|
299
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
300
|
+
|
301
|
+
</li>
|
302
|
+
|
303
|
+
|
304
|
+
</ul>
|
305
|
+
|
306
|
+
|
307
|
+
|
308
|
+
|
309
|
+
<div id="instance_method_details" class="method_details_list">
|
310
|
+
<h2>Instance Method Details</h2>
|
311
|
+
|
312
|
+
|
313
|
+
<div class="method_details first">
|
314
|
+
<h3 class="signature first" id="article_index-instance_method">
|
315
|
+
|
316
|
+
- (<tt>Object</tt>) <strong>article_index</strong>
|
317
|
+
|
318
|
+
|
319
|
+
|
320
|
+
|
321
|
+
|
322
|
+
</h3><table class="source_code">
|
323
|
+
<tr>
|
324
|
+
<td>
|
325
|
+
<pre class="lines">
|
326
|
+
|
327
|
+
|
328
|
+
47
|
329
|
+
48
|
330
|
+
49</pre>
|
331
|
+
</td>
|
332
|
+
<td>
|
333
|
+
<pre class="code"><span class="info file"># File 'lib/cw/rss.rb', line 47</span>
|
334
|
+
|
335
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_article_index'>article_index</span>
|
336
|
+
<span class='ivar'>@article_index</span> <span class='op'>||</span> <span class='ivar'>@article_index</span> <span class='op'>=</span> <span class='int'>0</span>
|
337
|
+
<span class='kw'>end</span></pre>
|
338
|
+
</td>
|
339
|
+
</tr>
|
340
|
+
</table>
|
341
|
+
</div>
|
342
|
+
|
343
|
+
<div class="method_details ">
|
344
|
+
<h3 class="signature " id="cw_chars-instance_method">
|
345
|
+
|
346
|
+
- (<tt>Object</tt>) <strong>cw_chars</strong>(chr)
|
347
|
+
|
348
|
+
|
349
|
+
|
350
|
+
|
351
|
+
|
352
|
+
</h3><table class="source_code">
|
353
|
+
<tr>
|
354
|
+
<td>
|
355
|
+
<pre class="lines">
|
356
|
+
|
357
|
+
|
358
|
+
51
|
359
|
+
52
|
360
|
+
53</pre>
|
361
|
+
</td>
|
362
|
+
<td>
|
363
|
+
<pre class="code"><span class="info file"># File 'lib/cw/rss.rb', line 51</span>
|
364
|
+
|
365
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_cw_chars'>cw_chars</span> <span class='id identifier rubyid_chr'>chr</span>
|
366
|
+
<span class='id identifier rubyid_chr'>chr</span><span class='period'>.</span><span class='id identifier rubyid_tr'>tr</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>^a-z0-9\.\,+</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
367
|
+
<span class='kw'>end</span></pre>
|
368
|
+
</td>
|
369
|
+
</tr>
|
370
|
+
</table>
|
371
|
+
</div>
|
372
|
+
|
373
|
+
<div class="method_details ">
|
374
|
+
<h3 class="signature " id="exclude_non_cw_chars-instance_method">
|
375
|
+
|
376
|
+
- (<tt>Object</tt>) <strong>exclude_non_cw_chars</strong>(word)
|
377
|
+
|
378
|
+
|
379
|
+
|
380
|
+
|
381
|
+
|
382
|
+
</h3><table class="source_code">
|
383
|
+
<tr>
|
384
|
+
<td>
|
385
|
+
<pre class="lines">
|
386
|
+
|
387
|
+
|
388
|
+
55
|
389
|
+
56
|
390
|
+
57
|
391
|
+
58
|
392
|
+
59
|
393
|
+
60
|
394
|
+
61</pre>
|
395
|
+
</td>
|
396
|
+
<td>
|
397
|
+
<pre class="code"><span class="info file"># File 'lib/cw/rss.rb', line 55</span>
|
398
|
+
|
399
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_exclude_non_cw_chars'>exclude_non_cw_chars</span> <span class='id identifier rubyid_word'>word</span>
|
400
|
+
<span class='id identifier rubyid_temp'>temp</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span>
|
401
|
+
<span class='id identifier rubyid_word'>word</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_chr'>chr</span><span class='op'>|</span>
|
402
|
+
<span class='id identifier rubyid_temp'>temp</span> <span class='op'>+=</span> <span class='id identifier rubyid_chr'>chr</span> <span class='kw'>if</span> <span class='id identifier rubyid_letter'>letter</span><span class='lparen'>(</span><span class='id identifier rubyid_chr'>chr</span><span class='rparen'>)</span>
|
403
|
+
<span class='kw'>end</span>
|
404
|
+
<span class='id identifier rubyid_temp'>temp</span>
|
405
|
+
<span class='kw'>end</span></pre>
|
406
|
+
</td>
|
407
|
+
</tr>
|
408
|
+
</table>
|
409
|
+
</div>
|
410
|
+
|
411
|
+
<div class="method_details ">
|
412
|
+
<h3 class="signature " id="inc_article_index-instance_method">
|
413
|
+
|
414
|
+
- (<tt>Object</tt>) <strong>inc_article_index</strong>
|
415
|
+
|
416
|
+
|
417
|
+
|
418
|
+
|
419
|
+
|
420
|
+
</h3><table class="source_code">
|
421
|
+
<tr>
|
422
|
+
<td>
|
423
|
+
<pre class="lines">
|
424
|
+
|
425
|
+
|
426
|
+
43
|
427
|
+
44
|
428
|
+
45</pre>
|
429
|
+
</td>
|
430
|
+
<td>
|
431
|
+
<pre class="code"><span class="info file"># File 'lib/cw/rss.rb', line 43</span>
|
432
|
+
|
433
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_inc_article_index'>inc_article_index</span>
|
434
|
+
<span class='ivar'>@article_index</span> <span class='op'>+=</span> <span class='int'>1</span>
|
435
|
+
<span class='kw'>end</span></pre>
|
436
|
+
</td>
|
437
|
+
</tr>
|
438
|
+
</table>
|
439
|
+
</div>
|
440
|
+
|
441
|
+
<div class="method_details ">
|
442
|
+
<h3 class="signature " id="next_article-instance_method">
|
443
|
+
|
444
|
+
- (<tt>Object</tt>) <strong>next_article</strong>
|
445
|
+
|
446
|
+
|
447
|
+
|
448
|
+
|
449
|
+
|
450
|
+
</h3><table class="source_code">
|
451
|
+
<tr>
|
452
|
+
<td>
|
453
|
+
<pre class="lines">
|
454
|
+
|
455
|
+
|
456
|
+
63
|
457
|
+
64
|
458
|
+
65
|
459
|
+
66
|
460
|
+
67
|
461
|
+
68
|
462
|
+
69
|
463
|
+
70</pre>
|
464
|
+
</td>
|
465
|
+
<td>
|
466
|
+
<pre class="code"><span class="info file"># File 'lib/cw/rss.rb', line 63</span>
|
467
|
+
|
468
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_next_article'>next_article</span>
|
469
|
+
<span class='id identifier rubyid_temp'>temp</span> <span class='op'>=</span> <span class='ivar'>@rss_articles</span><span class='lbracket'>[</span><span class='id identifier rubyid_article_index'>article_index</span><span class='rbracket'>]</span>
|
470
|
+
<span class='kw'>return</span> <span class='kw'>unless</span> <span class='id identifier rubyid_temp'>temp</span>
|
471
|
+
<span class='id identifier rubyid_inc_article_index'>inc_article_index</span>
|
472
|
+
<span class='id identifier rubyid_quote'>quote</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span>
|
473
|
+
<span class='id identifier rubyid_temp'>temp</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_i'>i</span><span class='op'>|</span> <span class='id identifier rubyid_quote'>quote</span> <span class='op'>+=</span> <span class='id identifier rubyid_i'>i</span> <span class='rbrace'>}</span>
|
474
|
+
<span class='lparen'>(</span><span class='id identifier rubyid_quote'>quote</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span><span class='period'>.</span><span class='id identifier rubyid_collect'>collect</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_article'>article</span><span class='op'>|</span> <span class='id identifier rubyid_cw_chars'>cw_chars</span><span class='lparen'>(</span><span class='id identifier rubyid_article'>article</span><span class='period'>.</span><span class='id identifier rubyid_strip'>strip</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\"</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_downcase'>downcase</span><span class='rparen'>)</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
475
|
+
<span class='kw'>end</span></pre>
|
476
|
+
</td>
|
477
|
+
</tr>
|
478
|
+
</table>
|
479
|
+
</div>
|
480
|
+
|
481
|
+
<div class="method_details ">
|
482
|
+
<h3 class="signature " id="read_rss-instance_method">
|
483
|
+
|
484
|
+
- (<tt>Object</tt>) <strong>read_rss</strong>(src, show_count = 3)
|
485
|
+
|
486
|
+
|
487
|
+
|
488
|
+
|
489
|
+
|
490
|
+
</h3><table class="source_code">
|
491
|
+
<tr>
|
492
|
+
<td>
|
493
|
+
<pre class="lines">
|
494
|
+
|
495
|
+
|
496
|
+
20
|
497
|
+
21
|
498
|
+
22
|
499
|
+
23
|
500
|
+
24
|
501
|
+
25
|
502
|
+
26
|
503
|
+
27
|
504
|
+
28
|
505
|
+
29
|
506
|
+
30
|
507
|
+
31
|
508
|
+
32
|
509
|
+
33
|
510
|
+
34
|
511
|
+
35
|
512
|
+
36
|
513
|
+
37
|
514
|
+
38
|
515
|
+
39
|
516
|
+
40
|
517
|
+
41</pre>
|
518
|
+
</td>
|
519
|
+
<td>
|
520
|
+
<pre class="code"><span class="info file"># File 'lib/cw/rss.rb', line 20</span>
|
521
|
+
|
522
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_read_rss'>read_rss</span><span class='lparen'>(</span><span class='id identifier rubyid_src'>src</span><span class='comma'>,</span> <span class='id identifier rubyid_show_count'>show_count</span> <span class='op'>=</span> <span class='int'>3</span><span class='rparen'>)</span>
|
523
|
+
<span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>feedjira</span><span class='tstring_end'>'</span></span>
|
524
|
+
<span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>htmlentities</span><span class='tstring_end'>"</span></span>
|
525
|
+
<span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>sanitize</span><span class='tstring_end'>'</span></span>
|
526
|
+
<span class='id identifier rubyid_coder'>coder</span> <span class='op'>=</span> <span class='const'>HTMLEntities</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
527
|
+
<span class='id identifier rubyid_url'>url</span> <span class='op'>=</span> <span class='id identifier rubyid_source'>source</span><span class='lparen'>(</span><span class='id identifier rubyid_src'>src</span><span class='rparen'>)</span>
|
528
|
+
<span class='id identifier rubyid_feed'>feed</span> <span class='op'>=</span> <span class='const'>Feedjira</span><span class='op'>::</span><span class='const'>Feed</span><span class='period'>.</span><span class='id identifier rubyid_fetch_and_parse'>fetch_and_parse</span> <span class='id identifier rubyid_url'>url</span> <span class='comment'># returns a Hash, with each url having a Feedjira::Feed object
|
529
|
+
</span> <span class='id identifier rubyid_entry_count'>entry_count</span> <span class='op'>=</span> <span class='int'>0</span>
|
530
|
+
<span class='ivar'>@rss_articles</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
531
|
+
<span class='id identifier rubyid_entry'>entry</span> <span class='op'>=</span> <span class='id identifier rubyid_feed'>feed</span><span class='period'>.</span><span class='id identifier rubyid_entries'>entries</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_entry'>entry</span><span class='op'>|</span>
|
532
|
+
<span class='id identifier rubyid_title'>title</span> <span class='op'>=</span> <span class='id identifier rubyid_entry'>entry</span><span class='period'>.</span><span class='id identifier rubyid_title'>title</span>
|
533
|
+
<span class='kw'>unless</span><span class='lparen'>(</span><span class='id identifier rubyid_title'>title</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>VIDEO:</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span> <span class='op'>||</span>
|
534
|
+
<span class='id identifier rubyid_title'>title</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>In pictures:</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span> <span class='op'>||</span>
|
535
|
+
<span class='id identifier rubyid_title'>title</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Morning business round-up</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='rparen'>)</span>
|
536
|
+
<span class='id identifier rubyid_words'>words</span> <span class='op'>=</span> <span class='id identifier rubyid_entry'>entry</span><span class='period'>.</span><span class='id identifier rubyid_summary'>summary</span>
|
537
|
+
<span class='id identifier rubyid_entry_count'>entry_count</span> <span class='op'>+=</span> <span class='int'>1</span>
|
538
|
+
<span class='kw'>end</span>
|
539
|
+
<span class='ivar'>@rss_articles</span> <span class='op'><<</span> <span class='lparen'>(</span><span class='const'>Sanitize</span><span class='period'>.</span><span class='id identifier rubyid_clean'>clean</span> <span class='id identifier rubyid_coder'>coder</span><span class='period'>.</span><span class='id identifier rubyid_decode'>decode</span> <span class='id identifier rubyid_words'>words</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>,</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
540
|
+
<span class='kw'>break</span> <span class='kw'>if</span> <span class='id identifier rubyid_entry_count'>entry_count</span> <span class='op'>>=</span> <span class='id identifier rubyid_show_count'>show_count</span>
|
541
|
+
<span class='kw'>end</span>
|
542
|
+
<span class='ivar'>@rss_flag</span> <span class='op'>=</span> <span class='kw'>true</span>
|
543
|
+
<span class='kw'>end</span></pre>
|
544
|
+
</td>
|
545
|
+
</tr>
|
546
|
+
</table>
|
547
|
+
</div>
|
548
|
+
|
549
|
+
<div class="method_details ">
|
550
|
+
<h3 class="signature " id="source-instance_method">
|
551
|
+
|
552
|
+
- (<tt>Object</tt>) <strong>source</strong>(src)
|
553
|
+
|
554
|
+
|
555
|
+
|
556
|
+
|
557
|
+
|
558
|
+
</h3><table class="source_code">
|
559
|
+
<tr>
|
560
|
+
<td>
|
561
|
+
<pre class="lines">
|
562
|
+
|
563
|
+
|
564
|
+
16
|
565
|
+
17
|
566
|
+
18</pre>
|
567
|
+
</td>
|
568
|
+
<td>
|
569
|
+
<pre class="code"><span class="info file"># File 'lib/cw/rss.rb', line 16</span>
|
570
|
+
|
571
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_source'>source</span> <span class='id identifier rubyid_src'>src</span>
|
572
|
+
<span class='id identifier rubyid_sources'>sources</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span><span class='lparen'>(</span><span class='id identifier rubyid_src'>src</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_sources'>sources</span><span class='lbracket'>[</span><span class='id identifier rubyid_src'>src</span><span class='rbracket'>]</span> <span class='op'>:</span> <span class='id identifier rubyid_sources'>sources</span><span class='lbracket'>[</span><span class='symbol'>:quotations</span><span class='rbracket'>]</span>
|
573
|
+
<span class='kw'>end</span></pre>
|
574
|
+
</td>
|
575
|
+
</tr>
|
576
|
+
</table>
|
577
|
+
</div>
|
578
|
+
|
579
|
+
<div class="method_details ">
|
580
|
+
<h3 class="signature " id="sources-instance_method">
|
581
|
+
|
582
|
+
- (<tt>Object</tt>) <strong>sources</strong>
|
583
|
+
|
584
|
+
|
585
|
+
|
586
|
+
|
587
|
+
|
588
|
+
</h3><table class="source_code">
|
589
|
+
<tr>
|
590
|
+
<td>
|
591
|
+
<pre class="lines">
|
592
|
+
|
593
|
+
|
594
|
+
7
|
595
|
+
8
|
596
|
+
9
|
597
|
+
10
|
598
|
+
11
|
599
|
+
12
|
600
|
+
13
|
601
|
+
14</pre>
|
602
|
+
</td>
|
603
|
+
<td>
|
604
|
+
<pre class="code"><span class="info file"># File 'lib/cw/rss.rb', line 7</span>
|
605
|
+
|
606
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_sources'>sources</span>
|
607
|
+
<span class='lbrace'>{</span>
|
608
|
+
<span class='label'>bbc:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>http://feeds.bbci.co.uk/news/rss.xml</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
609
|
+
<span class='label'>reuters:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>http://feeds.reuters.com/Reuters/worldNews?format=xml</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
610
|
+
<span class='label'>guardian:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>http://www.theguardian.com/world/rss</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
611
|
+
<span class='label'>quotations:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>http://feeds.feedburner.com/quotationspage/qotd</span><span class='tstring_end'>'</span></span>
|
612
|
+
<span class='rbrace'>}</span>
|
613
|
+
<span class='kw'>end</span></pre>
|
614
|
+
</td>
|
615
|
+
</tr>
|
616
|
+
</table>
|
617
|
+
</div>
|
618
|
+
|
619
|
+
</div>
|
620
|
+
|
621
|
+
</div>
|
622
|
+
|
623
|
+
<div id="footer">
|
624
|
+
Generated on Mon May 23 21:20:16 2016 by
|
625
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
626
|
+
0.8.7.6 (ruby-2.2.0).
|
627
|
+
</div>
|
628
|
+
|
629
|
+
</body>
|
630
|
+
</html>
|