html2rss 0.4.1 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +3 -0
- data/CHANGELOG.md +10 -1
- data/Gemfile.lock +3 -1
- data/README.md +35 -2
- data/html2rss.gemspec +1 -0
- data/lib/html2rss/attribute_post_processors/sanitize_html.rb +1 -3
- data/lib/html2rss/config.rb +4 -0
- data/lib/html2rss/item.rb +7 -4
- data/lib/html2rss/utils.rb +8 -0
- data/lib/html2rss/version.rb +1 -1
- metadata +15 -35
- data/docs/Html2rss.html +0 -353
- data/docs/Html2rss/AttributePostProcessors.html +0 -203
- data/docs/Html2rss/AttributePostProcessors/HtmlToMarkdown.html +0 -325
- data/docs/Html2rss/AttributePostProcessors/ParseTime.html +0 -326
- data/docs/Html2rss/AttributePostProcessors/ParseUri.html +0 -314
- data/docs/Html2rss/AttributePostProcessors/SanitizeHtml.html +0 -367
- data/docs/Html2rss/AttributePostProcessors/Substring.html +0 -321
- data/docs/Html2rss/AttributePostProcessors/Template.html +0 -336
- data/docs/Html2rss/Config.html +0 -847
- data/docs/Html2rss/FeedBuilder.html +0 -295
- data/docs/Html2rss/Item.html +0 -660
- data/docs/Html2rss/ItemExtractors.html +0 -297
- data/docs/Html2rss/ItemExtractors/Attribute.html +0 -317
- data/docs/Html2rss/ItemExtractors/CurrentTime.html +0 -297
- data/docs/Html2rss/ItemExtractors/Href.html +0 -319
- data/docs/Html2rss/ItemExtractors/Html.html +0 -314
- data/docs/Html2rss/ItemExtractors/Static.html +0 -301
- data/docs/Html2rss/ItemExtractors/Text.html +0 -312
- data/docs/Html2rss/Utils.html +0 -200
- data/docs/Html2rss/Utils/IndifferentAccessHash.html +0 -142
- data/docs/_index.html +0 -307
- data/docs/class_list.html +0 -51
- data/docs/css/common.css +0 -1
- data/docs/css/full_list.css +0 -58
- data/docs/css/style.css +0 -496
- data/docs/file.README.html +0 -135
- data/docs/file_list.html +0 -56
- data/docs/frames.html +0 -17
- data/docs/index.html +0 -135
- data/docs/js/app.js +0 -303
- data/docs/js/full_list.js +0 -216
- data/docs/js/jquery.js +0 -4
- data/docs/method_list.html +0 -467
- data/docs/top-level-namespace.html +0 -110
@@ -1,295 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<meta charset="utf-8">
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
-
<title>
|
7
|
-
Class: Html2rss::FeedBuilder
|
8
|
-
|
9
|
-
— Documentation by YARD 0.9.20
|
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
|
-
pathId = "Html2rss::FeedBuilder";
|
19
|
-
relpath = '../';
|
20
|
-
</script>
|
21
|
-
|
22
|
-
|
23
|
-
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
24
|
-
|
25
|
-
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
26
|
-
|
27
|
-
|
28
|
-
</head>
|
29
|
-
<body>
|
30
|
-
<div class="nav_wrap">
|
31
|
-
<iframe id="nav" src="../class_list.html?1"></iframe>
|
32
|
-
<div id="resizer"></div>
|
33
|
-
</div>
|
34
|
-
|
35
|
-
<div id="main" tabindex="-1">
|
36
|
-
<div id="header">
|
37
|
-
<div id="menu">
|
38
|
-
|
39
|
-
<a href="../_index.html">Index (F)</a> »
|
40
|
-
<span class='title'><span class='object_link'><a href="../Html2rss.html" title="Html2rss (module)">Html2rss</a></span></span>
|
41
|
-
»
|
42
|
-
<span class="title">FeedBuilder</span>
|
43
|
-
|
44
|
-
</div>
|
45
|
-
|
46
|
-
<div id="search">
|
47
|
-
|
48
|
-
<a class="full_list_link" id="class_list_link"
|
49
|
-
href="../class_list.html">
|
50
|
-
|
51
|
-
<svg width="24" height="24">
|
52
|
-
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
-
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
-
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
-
</svg>
|
56
|
-
</a>
|
57
|
-
|
58
|
-
</div>
|
59
|
-
<div class="clear"></div>
|
60
|
-
</div>
|
61
|
-
|
62
|
-
<div id="content"><h1>Class: Html2rss::FeedBuilder
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
</h1>
|
67
|
-
<div class="box_info">
|
68
|
-
|
69
|
-
<dl>
|
70
|
-
<dt>Inherits:</dt>
|
71
|
-
<dd>
|
72
|
-
<span class="inheritName">Object</span>
|
73
|
-
|
74
|
-
<ul class="fullTree">
|
75
|
-
<li>Object</li>
|
76
|
-
|
77
|
-
<li class="next">Html2rss::FeedBuilder</li>
|
78
|
-
|
79
|
-
</ul>
|
80
|
-
<a href="#" class="inheritanceTree">show all</a>
|
81
|
-
|
82
|
-
</dd>
|
83
|
-
</dl>
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
<dl>
|
96
|
-
<dt>Defined in:</dt>
|
97
|
-
<dd>lib/html2rss/feed_builder.rb</dd>
|
98
|
-
</dl>
|
99
|
-
|
100
|
-
</div>
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
<h2>
|
111
|
-
Instance Method Summary
|
112
|
-
<small><a href="#" class="summary_toggle">collapse</a></small>
|
113
|
-
</h2>
|
114
|
-
|
115
|
-
<ul class="summary">
|
116
|
-
|
117
|
-
<li class="public ">
|
118
|
-
<span class="summary_signature">
|
119
|
-
|
120
|
-
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(config) ⇒ FeedBuilder </a>
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
</span>
|
125
|
-
|
126
|
-
|
127
|
-
<span class="note title constructor">constructor</span>
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
<span class="summary_desc"><div class='inline'>
|
137
|
-
<p>A new instance of FeedBuilder.</p>
|
138
|
-
</div></span>
|
139
|
-
|
140
|
-
</li>
|
141
|
-
|
142
|
-
|
143
|
-
<li class="public ">
|
144
|
-
<span class="summary_signature">
|
145
|
-
|
146
|
-
<a href="#rss-instance_method" title="#rss (instance method)">#<strong>rss</strong> ⇒ RSS:Rss </a>
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
</span>
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
161
|
-
|
162
|
-
</li>
|
163
|
-
|
164
|
-
|
165
|
-
</ul>
|
166
|
-
|
167
|
-
|
168
|
-
<div id="constructor_details" class="method_details_list">
|
169
|
-
<h2>Constructor Details</h2>
|
170
|
-
|
171
|
-
<div class="method_details first">
|
172
|
-
<h3 class="signature first" id="initialize-instance_method">
|
173
|
-
|
174
|
-
#<strong>initialize</strong>(config) ⇒ <tt><span class='object_link'><a href="" title="Html2rss::FeedBuilder (class)">FeedBuilder</a></span></tt>
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
</h3><div class="docstring">
|
181
|
-
<div class="discussion">
|
182
|
-
|
183
|
-
<p>Returns a new instance of FeedBuilder</p>
|
184
|
-
|
185
|
-
|
186
|
-
</div>
|
187
|
-
</div>
|
188
|
-
<div class="tags">
|
189
|
-
|
190
|
-
|
191
|
-
</div><table class="source_code">
|
192
|
-
<tr>
|
193
|
-
<td>
|
194
|
-
<pre class="lines">
|
195
|
-
|
196
|
-
|
197
|
-
6
|
198
|
-
7
|
199
|
-
8</pre>
|
200
|
-
</td>
|
201
|
-
<td>
|
202
|
-
<pre class="code"><span class="info file"># File 'lib/html2rss/feed_builder.rb', line 6</span>
|
203
|
-
|
204
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_config'>config</span><span class='rparen'>)</span>
|
205
|
-
<span class='ivar'>@config</span> <span class='op'>=</span> <span class='id identifier rubyid_config'>config</span>
|
206
|
-
<span class='kw'>end</span></pre>
|
207
|
-
</td>
|
208
|
-
</tr>
|
209
|
-
</table>
|
210
|
-
</div>
|
211
|
-
|
212
|
-
</div>
|
213
|
-
|
214
|
-
|
215
|
-
<div id="instance_method_details" class="method_details_list">
|
216
|
-
<h2>Instance Method Details</h2>
|
217
|
-
|
218
|
-
|
219
|
-
<div class="method_details first">
|
220
|
-
<h3 class="signature first" id="rss-instance_method">
|
221
|
-
|
222
|
-
#<strong>rss</strong> ⇒ <tt>RSS:Rss</tt>
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
</h3><div class="docstring">
|
229
|
-
<div class="discussion">
|
230
|
-
|
231
|
-
|
232
|
-
</div>
|
233
|
-
</div>
|
234
|
-
<div class="tags">
|
235
|
-
|
236
|
-
<p class="tag_title">Returns:</p>
|
237
|
-
<ul class="return">
|
238
|
-
|
239
|
-
<li>
|
240
|
-
|
241
|
-
|
242
|
-
<span class='type'>(<tt>RSS:Rss</tt>)</span>
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
</li>
|
247
|
-
|
248
|
-
</ul>
|
249
|
-
|
250
|
-
</div><table class="source_code">
|
251
|
-
<tr>
|
252
|
-
<td>
|
253
|
-
<pre class="lines">
|
254
|
-
|
255
|
-
|
256
|
-
12
|
257
|
-
13
|
258
|
-
14
|
259
|
-
15
|
260
|
-
16
|
261
|
-
17
|
262
|
-
18
|
263
|
-
19
|
264
|
-
20</pre>
|
265
|
-
</td>
|
266
|
-
<td>
|
267
|
-
<pre class="code"><span class="info file"># File 'lib/html2rss/feed_builder.rb', line 12</span>
|
268
|
-
|
269
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_rss'>rss</span>
|
270
|
-
<span class='const'>RSS</span><span class='op'>::</span><span class='const'>Maker</span><span class='period'>.</span><span class='id identifier rubyid_make'>make</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>2.0</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_maker'>maker</span><span class='op'>|</span>
|
271
|
-
<span class='id identifier rubyid_add_channel_to_maker'>add_channel_to_maker</span><span class='lparen'>(</span><span class='id identifier rubyid_maker'>maker</span><span class='rparen'>)</span>
|
272
|
-
|
273
|
-
<span class='id identifier rubyid_feed_items'>feed_items</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_feed_item'>feed_item</span><span class='op'>|</span>
|
274
|
-
<span class='id identifier rubyid_add_item_to_items'>add_item_to_items</span><span class='lparen'>(</span><span class='id identifier rubyid_feed_item'>feed_item</span><span class='comma'>,</span> <span class='id identifier rubyid_maker'>maker</span><span class='period'>.</span><span class='id identifier rubyid_items'>items</span><span class='rparen'>)</span>
|
275
|
-
<span class='kw'>end</span>
|
276
|
-
<span class='kw'>end</span>
|
277
|
-
<span class='kw'>end</span></pre>
|
278
|
-
</td>
|
279
|
-
</tr>
|
280
|
-
</table>
|
281
|
-
</div>
|
282
|
-
|
283
|
-
</div>
|
284
|
-
|
285
|
-
</div>
|
286
|
-
|
287
|
-
<div id="footer">
|
288
|
-
Generated on Wed Sep 18 12:52:16 2019 by
|
289
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
290
|
-
0.9.20 (ruby-2.6.3).
|
291
|
-
</div>
|
292
|
-
|
293
|
-
</div>
|
294
|
-
</body>
|
295
|
-
</html>
|
data/docs/Html2rss/Item.html
DELETED
@@ -1,660 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<meta charset="utf-8">
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
-
<title>
|
7
|
-
Class: Html2rss::Item
|
8
|
-
|
9
|
-
— Documentation by YARD 0.9.20
|
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
|
-
pathId = "Html2rss::Item";
|
19
|
-
relpath = '../';
|
20
|
-
</script>
|
21
|
-
|
22
|
-
|
23
|
-
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
24
|
-
|
25
|
-
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
26
|
-
|
27
|
-
|
28
|
-
</head>
|
29
|
-
<body>
|
30
|
-
<div class="nav_wrap">
|
31
|
-
<iframe id="nav" src="../class_list.html?1"></iframe>
|
32
|
-
<div id="resizer"></div>
|
33
|
-
</div>
|
34
|
-
|
35
|
-
<div id="main" tabindex="-1">
|
36
|
-
<div id="header">
|
37
|
-
<div id="menu">
|
38
|
-
|
39
|
-
<a href="../_index.html">Index (I)</a> »
|
40
|
-
<span class='title'><span class='object_link'><a href="../Html2rss.html" title="Html2rss (module)">Html2rss</a></span></span>
|
41
|
-
»
|
42
|
-
<span class="title">Item</span>
|
43
|
-
|
44
|
-
</div>
|
45
|
-
|
46
|
-
<div id="search">
|
47
|
-
|
48
|
-
<a class="full_list_link" id="class_list_link"
|
49
|
-
href="../class_list.html">
|
50
|
-
|
51
|
-
<svg width="24" height="24">
|
52
|
-
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
-
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
-
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
-
</svg>
|
56
|
-
</a>
|
57
|
-
|
58
|
-
</div>
|
59
|
-
<div class="clear"></div>
|
60
|
-
</div>
|
61
|
-
|
62
|
-
<div id="content"><h1>Class: Html2rss::Item
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
</h1>
|
67
|
-
<div class="box_info">
|
68
|
-
|
69
|
-
<dl>
|
70
|
-
<dt>Inherits:</dt>
|
71
|
-
<dd>
|
72
|
-
<span class="inheritName">Object</span>
|
73
|
-
|
74
|
-
<ul class="fullTree">
|
75
|
-
<li>Object</li>
|
76
|
-
|
77
|
-
<li class="next">Html2rss::Item</li>
|
78
|
-
|
79
|
-
</ul>
|
80
|
-
<a href="#" class="inheritanceTree">show all</a>
|
81
|
-
|
82
|
-
</dd>
|
83
|
-
</dl>
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
<dl>
|
96
|
-
<dt>Defined in:</dt>
|
97
|
-
<dd>lib/html2rss/item.rb</dd>
|
98
|
-
</dl>
|
99
|
-
|
100
|
-
</div>
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
<h2>
|
111
|
-
Class Method Summary
|
112
|
-
<small><a href="#" class="summary_toggle">collapse</a></small>
|
113
|
-
</h2>
|
114
|
-
|
115
|
-
<ul class="summary">
|
116
|
-
|
117
|
-
<li class="public ">
|
118
|
-
<span class="summary_signature">
|
119
|
-
|
120
|
-
<a href="#from_url-class_method" title="from_url (class method)">.<strong>from_url</strong>(url, config) ⇒ Array </a>
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
</span>
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
135
|
-
|
136
|
-
</li>
|
137
|
-
|
138
|
-
|
139
|
-
</ul>
|
140
|
-
|
141
|
-
<h2>
|
142
|
-
Instance Method Summary
|
143
|
-
<small><a href="#" class="summary_toggle">collapse</a></small>
|
144
|
-
</h2>
|
145
|
-
|
146
|
-
<ul class="summary">
|
147
|
-
|
148
|
-
<li class="public ">
|
149
|
-
<span class="summary_signature">
|
150
|
-
|
151
|
-
<a href="#available_attributes-instance_method" title="#available_attributes (instance method)">#<strong>available_attributes</strong> ⇒ Object </a>
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
</span>
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
166
|
-
|
167
|
-
</li>
|
168
|
-
|
169
|
-
|
170
|
-
<li class="public ">
|
171
|
-
<span class="summary_signature">
|
172
|
-
|
173
|
-
<a href="#categories-instance_method" title="#categories (instance method)">#<strong>categories</strong> ⇒ Array </a>
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
</span>
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
188
|
-
|
189
|
-
</li>
|
190
|
-
|
191
|
-
|
192
|
-
<li class="public ">
|
193
|
-
<span class="summary_signature">
|
194
|
-
|
195
|
-
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(xml, config) ⇒ Item </a>
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
</span>
|
200
|
-
|
201
|
-
|
202
|
-
<span class="note title constructor">constructor</span>
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
<span class="summary_desc"><div class='inline'>
|
212
|
-
<p>A new instance of Item.</p>
|
213
|
-
</div></span>
|
214
|
-
|
215
|
-
</li>
|
216
|
-
|
217
|
-
|
218
|
-
<li class="public ">
|
219
|
-
<span class="summary_signature">
|
220
|
-
|
221
|
-
<a href="#method_missing-instance_method" title="#method_missing (instance method)">#<strong>method_missing</strong>(method_name, *_args) ⇒ Object </a>
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
</span>
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
236
|
-
|
237
|
-
</li>
|
238
|
-
|
239
|
-
|
240
|
-
<li class="public ">
|
241
|
-
<span class="summary_signature">
|
242
|
-
|
243
|
-
<a href="#respond_to_missing%3F-instance_method" title="#respond_to_missing? (instance method)">#<strong>respond_to_missing?</strong>(method_name, _include_private = false) ⇒ Boolean </a>
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
</span>
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
258
|
-
|
259
|
-
</li>
|
260
|
-
|
261
|
-
|
262
|
-
<li class="public ">
|
263
|
-
<span class="summary_signature">
|
264
|
-
|
265
|
-
<a href="#valid%3F-instance_method" title="#valid? (instance method)">#<strong>valid?</strong> ⇒ Boolean </a>
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
</span>
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
280
|
-
|
281
|
-
</li>
|
282
|
-
|
283
|
-
|
284
|
-
</ul>
|
285
|
-
|
286
|
-
|
287
|
-
<div id="constructor_details" class="method_details_list">
|
288
|
-
<h2>Constructor Details</h2>
|
289
|
-
|
290
|
-
<div class="method_details first">
|
291
|
-
<h3 class="signature first" id="initialize-instance_method">
|
292
|
-
|
293
|
-
#<strong>initialize</strong>(xml, config) ⇒ <tt><span class='object_link'><a href="" title="Html2rss::Item (class)">Item</a></span></tt>
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
</h3><div class="docstring">
|
300
|
-
<div class="discussion">
|
301
|
-
|
302
|
-
<p>Returns a new instance of Item</p>
|
303
|
-
|
304
|
-
|
305
|
-
</div>
|
306
|
-
</div>
|
307
|
-
<div class="tags">
|
308
|
-
|
309
|
-
|
310
|
-
</div><table class="source_code">
|
311
|
-
<tr>
|
312
|
-
<td>
|
313
|
-
<pre class="lines">
|
314
|
-
|
315
|
-
|
316
|
-
10
|
317
|
-
11
|
318
|
-
12
|
319
|
-
13</pre>
|
320
|
-
</td>
|
321
|
-
<td>
|
322
|
-
<pre class="code"><span class="info file"># File 'lib/html2rss/item.rb', line 10</span>
|
323
|
-
|
324
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_xml'>xml</span><span class='comma'>,</span> <span class='id identifier rubyid_config'>config</span><span class='rparen'>)</span>
|
325
|
-
<span class='ivar'>@xml</span> <span class='op'>=</span> <span class='id identifier rubyid_xml'>xml</span>
|
326
|
-
<span class='ivar'>@config</span> <span class='op'>=</span> <span class='id identifier rubyid_config'>config</span>
|
327
|
-
<span class='kw'>end</span></pre>
|
328
|
-
</td>
|
329
|
-
</tr>
|
330
|
-
</table>
|
331
|
-
</div>
|
332
|
-
|
333
|
-
</div>
|
334
|
-
<div id="method_missing_details" class="method_details_list">
|
335
|
-
<h2>Dynamic Method Handling</h2>
|
336
|
-
<p class="notice this">
|
337
|
-
This class handles dynamic methods through the <tt>method_missing</tt> method
|
338
|
-
|
339
|
-
</p>
|
340
|
-
|
341
|
-
<div class="method_details first">
|
342
|
-
<h3 class="signature first" id="method_missing-instance_method">
|
343
|
-
|
344
|
-
#<strong>method_missing</strong>(method_name, *_args) ⇒ <tt>Object</tt>
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
</h3><table class="source_code">
|
351
|
-
<tr>
|
352
|
-
<td>
|
353
|
-
<pre class="lines">
|
354
|
-
|
355
|
-
|
356
|
-
21
|
357
|
-
22
|
358
|
-
23
|
359
|
-
24
|
360
|
-
25
|
361
|
-
26
|
362
|
-
27
|
363
|
-
28
|
364
|
-
29</pre>
|
365
|
-
</td>
|
366
|
-
<td>
|
367
|
-
<pre class="code"><span class="info file"># File 'lib/html2rss/item.rb', line 21</span>
|
368
|
-
|
369
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_method_missing'>method_missing</span><span class='lparen'>(</span><span class='id identifier rubyid_method_name'>method_name</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid__args'>_args</span><span class='rparen'>)</span>
|
370
|
-
<span class='id identifier rubyid_attribute_config'>attribute_config</span> <span class='op'>=</span> <span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_options'>options</span><span class='lparen'>(</span><span class='id identifier rubyid_method_name'>method_name</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rparen'>)</span>
|
371
|
-
<span class='kw'>return</span> <span class='kw'>super</span> <span class='kw'>unless</span> <span class='id identifier rubyid_attribute_config'>attribute_config</span>
|
372
|
-
|
373
|
-
<span class='id identifier rubyid_extractor'>extractor</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="ItemExtractors.html" title="Html2rss::ItemExtractors (module)">ItemExtractors</a></span></span><span class='period'>.</span><span class='id identifier rubyid_get_extractor'><span class='object_link'><a href="ItemExtractors.html#get_extractor-class_method" title="Html2rss::ItemExtractors.get_extractor (method)">get_extractor</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_attribute_config'>attribute_config</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>extractor</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
374
|
-
<span class='id identifier rubyid_value'>value</span> <span class='op'>=</span> <span class='id identifier rubyid_extractor'>extractor</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_xml'>xml</span><span class='comma'>,</span> <span class='id identifier rubyid_attribute_config'>attribute_config</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_get'>get</span>
|
375
|
-
|
376
|
-
<span class='id identifier rubyid_post_process'>post_process</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='comma'>,</span> <span class='id identifier rubyid_attribute_config'>attribute_config</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>post_process</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='kw'>false</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
377
|
-
<span class='kw'>end</span></pre>
|
378
|
-
</td>
|
379
|
-
</tr>
|
380
|
-
</table>
|
381
|
-
</div>
|
382
|
-
|
383
|
-
</div>
|
384
|
-
|
385
|
-
|
386
|
-
<div id="class_method_details" class="method_details_list">
|
387
|
-
<h2>Class Method Details</h2>
|
388
|
-
|
389
|
-
|
390
|
-
<div class="method_details first">
|
391
|
-
<h3 class="signature first" id="from_url-class_method">
|
392
|
-
|
393
|
-
.<strong>from_url</strong>(url, config) ⇒ <tt>Array</tt>
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
</h3><div class="docstring">
|
400
|
-
<div class="discussion">
|
401
|
-
|
402
|
-
|
403
|
-
</div>
|
404
|
-
</div>
|
405
|
-
<div class="tags">
|
406
|
-
|
407
|
-
<p class="tag_title">Returns:</p>
|
408
|
-
<ul class="return">
|
409
|
-
|
410
|
-
<li>
|
411
|
-
|
412
|
-
|
413
|
-
<span class='type'>(<tt>Array</tt>)</span>
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
</li>
|
418
|
-
|
419
|
-
</ul>
|
420
|
-
|
421
|
-
</div><table class="source_code">
|
422
|
-
<tr>
|
423
|
-
<td>
|
424
|
-
<pre class="lines">
|
425
|
-
|
426
|
-
|
427
|
-
51
|
428
|
-
52
|
429
|
-
53
|
430
|
-
54
|
431
|
-
55
|
432
|
-
56</pre>
|
433
|
-
</td>
|
434
|
-
<td>
|
435
|
-
<pre class="code"><span class="info file"># File 'lib/html2rss/item.rb', line 51</span>
|
436
|
-
|
437
|
-
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_from_url'>from_url</span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</span><span class='comma'>,</span> <span class='id identifier rubyid_config'>config</span><span class='rparen'>)</span>
|
438
|
-
<span class='id identifier rubyid_page'>page</span> <span class='op'>=</span> <span class='const'>Nokogiri</span><span class='op'>::</span><span class='const'>HTML</span><span class='lparen'>(</span><span class='id identifier rubyid_get_body_from_url'>get_body_from_url</span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</span><span class='comma'>,</span> <span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_headers'>headers</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
439
|
-
<span class='id identifier rubyid_page'>page</span><span class='period'>.</span><span class='id identifier rubyid_css'>css</span><span class='lparen'>(</span><span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_selector'>selector</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>items</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_xml_item'>xml_item</span><span class='op'>|</span>
|
440
|
-
<span class='id identifier rubyid_new'>new</span> <span class='id identifier rubyid_xml_item'>xml_item</span><span class='comma'>,</span> <span class='id identifier rubyid_config'>config</span>
|
441
|
-
<span class='kw'>end</span>
|
442
|
-
<span class='kw'>end</span></pre>
|
443
|
-
</td>
|
444
|
-
</tr>
|
445
|
-
</table>
|
446
|
-
</div>
|
447
|
-
|
448
|
-
</div>
|
449
|
-
|
450
|
-
<div id="instance_method_details" class="method_details_list">
|
451
|
-
<h2>Instance Method Details</h2>
|
452
|
-
|
453
|
-
|
454
|
-
<div class="method_details first">
|
455
|
-
<h3 class="signature first" id="available_attributes-instance_method">
|
456
|
-
|
457
|
-
#<strong>available_attributes</strong> ⇒ <tt>Object</tt>
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
</h3><table class="source_code">
|
464
|
-
<tr>
|
465
|
-
<td>
|
466
|
-
<pre class="lines">
|
467
|
-
|
468
|
-
|
469
|
-
31
|
470
|
-
32
|
471
|
-
33
|
472
|
-
34</pre>
|
473
|
-
</td>
|
474
|
-
<td>
|
475
|
-
<pre class="code"><span class="info file"># File 'lib/html2rss/item.rb', line 31</span>
|
476
|
-
|
477
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_available_attributes'>available_attributes</span>
|
478
|
-
<span class='ivar'>@available_attributes</span> <span class='op'>||=</span> <span class='lparen'>(</span><span class='qwords_beg'>%w[</span><span class='tstring_content'>title</span><span class='words_sep'> </span><span class='tstring_content'>link</span><span class='words_sep'> </span><span class='tstring_content'>description</span><span class='words_sep'> </span><span class='tstring_content'>author</span><span class='words_sep'> </span><span class='tstring_content'>comments</span><span class='words_sep'> </span><span class='tstring_content'>updated</span><span class='tstring_end'>]</span></span> <span class='op'>&</span>
|
479
|
-
<span class='ivar'>@config</span><span class='period'>.</span><span class='id identifier rubyid_attribute_names'>attribute_names</span><span class='rparen'>)</span> <span class='op'>-</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>categories</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
|
480
|
-
<span class='kw'>end</span></pre>
|
481
|
-
</td>
|
482
|
-
</tr>
|
483
|
-
</table>
|
484
|
-
</div>
|
485
|
-
|
486
|
-
<div class="method_details ">
|
487
|
-
<h3 class="signature " id="categories-instance_method">
|
488
|
-
|
489
|
-
#<strong>categories</strong> ⇒ <tt>Array</tt>
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
</h3><div class="docstring">
|
496
|
-
<div class="discussion">
|
497
|
-
|
498
|
-
|
499
|
-
</div>
|
500
|
-
</div>
|
501
|
-
<div class="tags">
|
502
|
-
|
503
|
-
<p class="tag_title">Returns:</p>
|
504
|
-
<ul class="return">
|
505
|
-
|
506
|
-
<li>
|
507
|
-
|
508
|
-
|
509
|
-
<span class='type'>(<tt>Array</tt>)</span>
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
</li>
|
514
|
-
|
515
|
-
</ul>
|
516
|
-
|
517
|
-
</div><table class="source_code">
|
518
|
-
<tr>
|
519
|
-
<td>
|
520
|
-
<pre class="lines">
|
521
|
-
|
522
|
-
|
523
|
-
42
|
524
|
-
43
|
525
|
-
44
|
526
|
-
45
|
527
|
-
46
|
528
|
-
47</pre>
|
529
|
-
</td>
|
530
|
-
<td>
|
531
|
-
<pre class="code"><span class="info file"># File 'lib/html2rss/item.rb', line 42</span>
|
532
|
-
|
533
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_categories'>categories</span>
|
534
|
-
<span class='id identifier rubyid_categories'>categories</span> <span class='op'>=</span> <span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_categories'>categories</span>
|
535
|
-
<span class='id identifier rubyid_categories'>categories</span><span class='period'>.</span><span class='id identifier rubyid_map!'>map!</span><span class='lparen'>(</span><span class='op'>&</span><span class='id identifier rubyid_method'>method</span><span class='lparen'>(</span><span class='symbol'>:method_missing</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
536
|
-
<span class='id identifier rubyid_categories'>categories</span><span class='period'>.</span><span class='id identifier rubyid_uniq!'>uniq!</span>
|
537
|
-
<span class='id identifier rubyid_categories'>categories</span><span class='period'>.</span><span class='id identifier rubyid_keep_if'>keep_if</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_category'>category</span><span class='op'>|</span> <span class='id identifier rubyid_category'>category</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span> <span class='op'>!=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span> <span class='rbrace'>}</span>
|
538
|
-
<span class='kw'>end</span></pre>
|
539
|
-
</td>
|
540
|
-
</tr>
|
541
|
-
</table>
|
542
|
-
</div>
|
543
|
-
|
544
|
-
<div class="method_details ">
|
545
|
-
<h3 class="signature " id="respond_to_missing?-instance_method">
|
546
|
-
|
547
|
-
#<strong>respond_to_missing?</strong>(method_name, _include_private = false) ⇒ <tt>Boolean</tt>
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
</h3><div class="docstring">
|
554
|
-
<div class="discussion">
|
555
|
-
|
556
|
-
|
557
|
-
</div>
|
558
|
-
</div>
|
559
|
-
<div class="tags">
|
560
|
-
|
561
|
-
<p class="tag_title">Returns:</p>
|
562
|
-
<ul class="return">
|
563
|
-
|
564
|
-
<li>
|
565
|
-
|
566
|
-
|
567
|
-
<span class='type'>(<tt>Boolean</tt>)</span>
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
</li>
|
572
|
-
|
573
|
-
</ul>
|
574
|
-
|
575
|
-
</div><table class="source_code">
|
576
|
-
<tr>
|
577
|
-
<td>
|
578
|
-
<pre class="lines">
|
579
|
-
|
580
|
-
|
581
|
-
17
|
582
|
-
18
|
583
|
-
19</pre>
|
584
|
-
</td>
|
585
|
-
<td>
|
586
|
-
<pre class="code"><span class="info file"># File 'lib/html2rss/item.rb', line 17</span>
|
587
|
-
|
588
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_respond_to_missing?'>respond_to_missing?</span><span class='lparen'>(</span><span class='id identifier rubyid_method_name'>method_name</span><span class='comma'>,</span> <span class='id identifier rubyid__include_private'>_include_private</span> <span class='op'>=</span> <span class='kw'>false</span><span class='rparen'>)</span>
|
589
|
-
<span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_attribute_names'>attribute_names</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='id identifier rubyid_method_name'>method_name</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='kw'>super</span>
|
590
|
-
<span class='kw'>end</span></pre>
|
591
|
-
</td>
|
592
|
-
</tr>
|
593
|
-
</table>
|
594
|
-
</div>
|
595
|
-
|
596
|
-
<div class="method_details ">
|
597
|
-
<h3 class="signature " id="valid?-instance_method">
|
598
|
-
|
599
|
-
#<strong>valid?</strong> ⇒ <tt>Boolean</tt>
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
</h3><div class="docstring">
|
606
|
-
<div class="discussion">
|
607
|
-
|
608
|
-
|
609
|
-
</div>
|
610
|
-
</div>
|
611
|
-
<div class="tags">
|
612
|
-
|
613
|
-
<p class="tag_title">Returns:</p>
|
614
|
-
<ul class="return">
|
615
|
-
|
616
|
-
<li>
|
617
|
-
|
618
|
-
|
619
|
-
<span class='type'>(<tt>Boolean</tt>)</span>
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
</li>
|
624
|
-
|
625
|
-
</ul>
|
626
|
-
|
627
|
-
</div><table class="source_code">
|
628
|
-
<tr>
|
629
|
-
<td>
|
630
|
-
<pre class="lines">
|
631
|
-
|
632
|
-
|
633
|
-
36
|
634
|
-
37
|
635
|
-
38</pre>
|
636
|
-
</td>
|
637
|
-
<td>
|
638
|
-
<pre class="code"><span class="info file"># File 'lib/html2rss/item.rb', line 36</span>
|
639
|
-
|
640
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_valid?'>valid?</span>
|
641
|
-
<span class='lbracket'>[</span><span class='id identifier rubyid_title'>title</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='comma'>,</span> <span class='id identifier rubyid_description'>description</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span> <span class='op'>!=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span>
|
642
|
-
<span class='kw'>end</span></pre>
|
643
|
-
</td>
|
644
|
-
</tr>
|
645
|
-
</table>
|
646
|
-
</div>
|
647
|
-
|
648
|
-
</div>
|
649
|
-
|
650
|
-
</div>
|
651
|
-
|
652
|
-
<div id="footer">
|
653
|
-
Generated on Wed Sep 18 12:52:16 2019 by
|
654
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
655
|
-
0.9.20 (ruby-2.6.3).
|
656
|
-
</div>
|
657
|
-
|
658
|
-
</div>
|
659
|
-
</body>
|
660
|
-
</html>
|