rack-blogengine 1.0.7 → 1.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +2 -0
- data.tar.gz.sig +0 -0
- data/MANIFEST +33 -19
- data/README.md +5 -4
- data/doc/Operator.html +236 -0
- data/doc/Rack.html +117 -0
- data/doc/Rack/Blogengine.html +419 -0
- data/doc/Rack/Blogengine/Application.html +278 -0
- data/doc/Rack/Blogengine/ApplicationRouter.html +413 -0
- data/doc/Rack/Blogengine/CommandLineInterface.html +991 -0
- data/doc/Rack/Blogengine/Document.html +680 -0
- data/doc/Rack/Blogengine/DocumentParser.html +1708 -0
- data/doc/_index.html +197 -0
- data/doc/class_list.html +54 -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 +237 -0
- data/doc/file_list.html +56 -0
- data/doc/frames.html +26 -0
- data/doc/index.html +237 -0
- data/doc/js/app.js +219 -0
- data/doc/js/full_list.js +178 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +263 -0
- data/doc/top-level-namespace.html +114 -0
- data/lib/rack/blogengine/command_line_interface.rb +2 -2
- data/lib/rack/blogengine/version.rb +1 -1
- data/rack-blogengine.gemspec +2 -2
- metadata +48 -21
- metadata.gz.sig +0 -0
- data/.gitignore +0 -20
- data/.rubocop.yml +0 -2
- data/.travis.yml +0 -22
- data/Gemfile +0 -4
- data/Rakefile +0 -8
- data/checksum/rack-blogengine-1.0.6.gem.sha512 +0 -1
- data/task/build.rake +0 -4
- data/task/checksum.rake +0 -15
- data/task/default.rake +0 -5
- data/task/floodtest.rake +0 -33
- data/task/manifest.rake +0 -8
- data/task/test.rake +0 -19
- data/task/travis.rake +0 -5
- data/test/rack/blogengine/application_router_test.rb +0 -49
- data/test/rack/blogengine/application_test.rb +0 -41
- data/test/rack/blogengine/command_line_interface_test.rb +0 -70
- data/test/rack/blogengine/document_parser_test.rb +0 -70
- data/test/test_helper.rb +0 -68
@@ -0,0 +1,680 @@
|
|
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: Rack::Blogengine::Document
|
8
|
+
|
9
|
+
— Documentation by YARD 0.8.7.4
|
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#!Rack/Blogengine/Document.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 (D)</a> »
|
35
|
+
<span class='title'><span class='object_link'><a href="../../Rack.html" title="Rack (module)">Rack</a></span></span> » <span class='title'><span class='object_link'><a href="../Blogengine.html" title="Rack::Blogengine (module)">Blogengine</a></span></span>
|
36
|
+
»
|
37
|
+
<span class="title">Document</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: Rack::Blogengine::Document
|
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">Rack::Blogengine::Document</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/rack/blogengine/document.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>Document Class Contains attributes path, html, title, date</p>
|
106
|
+
|
107
|
+
|
108
|
+
</div>
|
109
|
+
</div>
|
110
|
+
<div class="tags">
|
111
|
+
|
112
|
+
<p class="tag_title">Author:</p>
|
113
|
+
<ul class="author">
|
114
|
+
|
115
|
+
<li>
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
<div class='inline'><dl class="rdoc-list label-list"><dt>benny
|
122
|
+
<dd></dd></dl>
|
123
|
+
</div>
|
124
|
+
|
125
|
+
</li>
|
126
|
+
|
127
|
+
</ul>
|
128
|
+
|
129
|
+
</div>
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
<h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
|
134
|
+
<ul class="summary">
|
135
|
+
|
136
|
+
<li class="public ">
|
137
|
+
<span class="summary_signature">
|
138
|
+
|
139
|
+
<a href="#date-instance_method" title="#date (instance method)">- (Object) <strong>date</strong> </a>
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
</span>
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
<span class="summary_desc"><div class='inline'>
|
157
|
+
<p>Returns the value of attribute date.</p>
|
158
|
+
</div></span>
|
159
|
+
|
160
|
+
</li>
|
161
|
+
|
162
|
+
|
163
|
+
<li class="public ">
|
164
|
+
<span class="summary_signature">
|
165
|
+
|
166
|
+
<a href="#html-instance_method" title="#html (instance method)">- (Object) <strong>html</strong> </a>
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
</span>
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
<span class="summary_desc"><div class='inline'>
|
184
|
+
<p>Returns the value of attribute html.</p>
|
185
|
+
</div></span>
|
186
|
+
|
187
|
+
</li>
|
188
|
+
|
189
|
+
|
190
|
+
<li class="public ">
|
191
|
+
<span class="summary_signature">
|
192
|
+
|
193
|
+
<a href="#path-instance_method" title="#path (instance method)">- (Object) <strong>path</strong> </a>
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
</span>
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
<span class="summary_desc"><div class='inline'>
|
211
|
+
<p>Returns the value of attribute path.</p>
|
212
|
+
</div></span>
|
213
|
+
|
214
|
+
</li>
|
215
|
+
|
216
|
+
|
217
|
+
<li class="public ">
|
218
|
+
<span class="summary_signature">
|
219
|
+
|
220
|
+
<a href="#title-instance_method" title="#title (instance method)">- (Object) <strong>title</strong> </a>
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
</span>
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
|
234
|
+
|
235
|
+
|
236
|
+
|
237
|
+
<span class="summary_desc"><div class='inline'>
|
238
|
+
<p>Returns the value of attribute title.</p>
|
239
|
+
</div></span>
|
240
|
+
|
241
|
+
</li>
|
242
|
+
|
243
|
+
|
244
|
+
</ul>
|
245
|
+
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
|
250
|
+
<h2>
|
251
|
+
Instance Method Summary
|
252
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
253
|
+
</h2>
|
254
|
+
|
255
|
+
<ul class="summary">
|
256
|
+
|
257
|
+
<li class="public ">
|
258
|
+
<span class="summary_signature">
|
259
|
+
|
260
|
+
<a href="#exec_content_operator-instance_method" title="#exec_content_operator (instance method)">- (String) <strong>exec_content_operator</strong>(documents, target) </a>
|
261
|
+
|
262
|
+
|
263
|
+
|
264
|
+
</span>
|
265
|
+
|
266
|
+
|
267
|
+
|
268
|
+
|
269
|
+
|
270
|
+
|
271
|
+
|
272
|
+
|
273
|
+
|
274
|
+
<span class="summary_desc"><div class='inline'>
|
275
|
+
<p>Executes Content Operators and returns modified html.</p>
|
276
|
+
</div></span>
|
277
|
+
|
278
|
+
</li>
|
279
|
+
|
280
|
+
|
281
|
+
<li class="public ">
|
282
|
+
<span class="summary_signature">
|
283
|
+
|
284
|
+
<a href="#to_hash-instance_method" title="#to_hash (instance method)">- (Hash) <strong>to_hash</strong> </a>
|
285
|
+
|
286
|
+
|
287
|
+
|
288
|
+
</span>
|
289
|
+
|
290
|
+
|
291
|
+
|
292
|
+
|
293
|
+
|
294
|
+
|
295
|
+
|
296
|
+
|
297
|
+
|
298
|
+
<span class="summary_desc"><div class='inline'>
|
299
|
+
<p>Converts Rack::Blogengine::Docuemnt to Hash.</p>
|
300
|
+
</div></span>
|
301
|
+
|
302
|
+
</li>
|
303
|
+
|
304
|
+
|
305
|
+
</ul>
|
306
|
+
|
307
|
+
|
308
|
+
|
309
|
+
<div id="instance_attr_details" class="attr_details">
|
310
|
+
<h2>Instance Attribute Details</h2>
|
311
|
+
|
312
|
+
|
313
|
+
<span id="date=-instance_method"></span>
|
314
|
+
<div class="method_details first">
|
315
|
+
<h3 class="signature first" id="date-instance_method">
|
316
|
+
|
317
|
+
- (<tt>Object</tt>) <strong>date</strong>
|
318
|
+
|
319
|
+
|
320
|
+
|
321
|
+
|
322
|
+
|
323
|
+
</h3><div class="docstring">
|
324
|
+
<div class="discussion">
|
325
|
+
|
326
|
+
<p>Returns the value of attribute date</p>
|
327
|
+
|
328
|
+
|
329
|
+
</div>
|
330
|
+
</div>
|
331
|
+
<div class="tags">
|
332
|
+
|
333
|
+
|
334
|
+
</div><table class="source_code">
|
335
|
+
<tr>
|
336
|
+
<td>
|
337
|
+
<pre class="lines">
|
338
|
+
|
339
|
+
|
340
|
+
10
|
341
|
+
11
|
342
|
+
12</pre>
|
343
|
+
</td>
|
344
|
+
<td>
|
345
|
+
<pre class="code"><span class="info file"># File 'lib/rack/blogengine/document.rb', line 10</span>
|
346
|
+
|
347
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_date'>date</span>
|
348
|
+
<span class='ivar'>@date</span>
|
349
|
+
<span class='kw'>end</span></pre>
|
350
|
+
</td>
|
351
|
+
</tr>
|
352
|
+
</table>
|
353
|
+
</div>
|
354
|
+
|
355
|
+
|
356
|
+
<span id="html=-instance_method"></span>
|
357
|
+
<div class="method_details ">
|
358
|
+
<h3 class="signature " id="html-instance_method">
|
359
|
+
|
360
|
+
- (<tt>Object</tt>) <strong>html</strong>
|
361
|
+
|
362
|
+
|
363
|
+
|
364
|
+
|
365
|
+
|
366
|
+
</h3><div class="docstring">
|
367
|
+
<div class="discussion">
|
368
|
+
|
369
|
+
<p>Returns the value of attribute html</p>
|
370
|
+
|
371
|
+
|
372
|
+
</div>
|
373
|
+
</div>
|
374
|
+
<div class="tags">
|
375
|
+
|
376
|
+
|
377
|
+
</div><table class="source_code">
|
378
|
+
<tr>
|
379
|
+
<td>
|
380
|
+
<pre class="lines">
|
381
|
+
|
382
|
+
|
383
|
+
10
|
384
|
+
11
|
385
|
+
12</pre>
|
386
|
+
</td>
|
387
|
+
<td>
|
388
|
+
<pre class="code"><span class="info file"># File 'lib/rack/blogengine/document.rb', line 10</span>
|
389
|
+
|
390
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_html'>html</span>
|
391
|
+
<span class='ivar'>@html</span>
|
392
|
+
<span class='kw'>end</span></pre>
|
393
|
+
</td>
|
394
|
+
</tr>
|
395
|
+
</table>
|
396
|
+
</div>
|
397
|
+
|
398
|
+
|
399
|
+
<span id="path=-instance_method"></span>
|
400
|
+
<div class="method_details ">
|
401
|
+
<h3 class="signature " id="path-instance_method">
|
402
|
+
|
403
|
+
- (<tt>Object</tt>) <strong>path</strong>
|
404
|
+
|
405
|
+
|
406
|
+
|
407
|
+
|
408
|
+
|
409
|
+
</h3><div class="docstring">
|
410
|
+
<div class="discussion">
|
411
|
+
|
412
|
+
<p>Returns the value of attribute path</p>
|
413
|
+
|
414
|
+
|
415
|
+
</div>
|
416
|
+
</div>
|
417
|
+
<div class="tags">
|
418
|
+
|
419
|
+
|
420
|
+
</div><table class="source_code">
|
421
|
+
<tr>
|
422
|
+
<td>
|
423
|
+
<pre class="lines">
|
424
|
+
|
425
|
+
|
426
|
+
10
|
427
|
+
11
|
428
|
+
12</pre>
|
429
|
+
</td>
|
430
|
+
<td>
|
431
|
+
<pre class="code"><span class="info file"># File 'lib/rack/blogengine/document.rb', line 10</span>
|
432
|
+
|
433
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_path'>path</span>
|
434
|
+
<span class='ivar'>@path</span>
|
435
|
+
<span class='kw'>end</span></pre>
|
436
|
+
</td>
|
437
|
+
</tr>
|
438
|
+
</table>
|
439
|
+
</div>
|
440
|
+
|
441
|
+
|
442
|
+
<span id="title=-instance_method"></span>
|
443
|
+
<div class="method_details ">
|
444
|
+
<h3 class="signature " id="title-instance_method">
|
445
|
+
|
446
|
+
- (<tt>Object</tt>) <strong>title</strong>
|
447
|
+
|
448
|
+
|
449
|
+
|
450
|
+
|
451
|
+
|
452
|
+
</h3><div class="docstring">
|
453
|
+
<div class="discussion">
|
454
|
+
|
455
|
+
<p>Returns the value of attribute title</p>
|
456
|
+
|
457
|
+
|
458
|
+
</div>
|
459
|
+
</div>
|
460
|
+
<div class="tags">
|
461
|
+
|
462
|
+
|
463
|
+
</div><table class="source_code">
|
464
|
+
<tr>
|
465
|
+
<td>
|
466
|
+
<pre class="lines">
|
467
|
+
|
468
|
+
|
469
|
+
10
|
470
|
+
11
|
471
|
+
12</pre>
|
472
|
+
</td>
|
473
|
+
<td>
|
474
|
+
<pre class="code"><span class="info file"># File 'lib/rack/blogengine/document.rb', line 10</span>
|
475
|
+
|
476
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_title'>title</span>
|
477
|
+
<span class='ivar'>@title</span>
|
478
|
+
<span class='kw'>end</span></pre>
|
479
|
+
</td>
|
480
|
+
</tr>
|
481
|
+
</table>
|
482
|
+
</div>
|
483
|
+
|
484
|
+
</div>
|
485
|
+
|
486
|
+
|
487
|
+
<div id="instance_method_details" class="method_details_list">
|
488
|
+
<h2>Instance Method Details</h2>
|
489
|
+
|
490
|
+
|
491
|
+
<div class="method_details first">
|
492
|
+
<h3 class="signature first" id="exec_content_operator-instance_method">
|
493
|
+
|
494
|
+
- (<tt>String</tt>) <strong>exec_content_operator</strong>(documents, target)
|
495
|
+
|
496
|
+
|
497
|
+
|
498
|
+
|
499
|
+
|
500
|
+
</h3><div class="docstring">
|
501
|
+
<div class="discussion">
|
502
|
+
|
503
|
+
<p>Executes Content Operators and returns modified html</p>
|
504
|
+
|
505
|
+
|
506
|
+
</div>
|
507
|
+
</div>
|
508
|
+
<div class="tags">
|
509
|
+
<p class="tag_title">Parameters:</p>
|
510
|
+
<ul class="param">
|
511
|
+
|
512
|
+
<li>
|
513
|
+
|
514
|
+
<span class='name'>documents</span>
|
515
|
+
|
516
|
+
|
517
|
+
<span class='type'>(<tt>Array</tt>)</span>
|
518
|
+
|
519
|
+
|
520
|
+
|
521
|
+
—
|
522
|
+
<div class='inline'><dl class="rdoc-list label-list"><dt>Array of Documents available in operators
|
523
|
+
<dd></dd></dl>
|
524
|
+
</div>
|
525
|
+
|
526
|
+
</li>
|
527
|
+
|
528
|
+
<li>
|
529
|
+
|
530
|
+
<span class='name'>target</span>
|
531
|
+
|
532
|
+
|
533
|
+
<span class='type'>(<tt>String</tt>)</span>
|
534
|
+
|
535
|
+
|
536
|
+
|
537
|
+
—
|
538
|
+
<div class='inline'><dl class="rdoc-list label-list"><dt>Target for executing Operator from Targetfolder
|
539
|
+
<dd></dd></dl>
|
540
|
+
</div>
|
541
|
+
|
542
|
+
</li>
|
543
|
+
|
544
|
+
</ul>
|
545
|
+
|
546
|
+
<p class="tag_title">Returns:</p>
|
547
|
+
<ul class="return">
|
548
|
+
|
549
|
+
<li>
|
550
|
+
|
551
|
+
|
552
|
+
<span class='type'>(<tt>String</tt>)</span>
|
553
|
+
|
554
|
+
|
555
|
+
|
556
|
+
—
|
557
|
+
<div class='inline'>
|
558
|
+
<p>@html [Sets @html to modified html from operator]</p>
|
559
|
+
</div>
|
560
|
+
|
561
|
+
</li>
|
562
|
+
|
563
|
+
</ul>
|
564
|
+
|
565
|
+
</div><table class="source_code">
|
566
|
+
<tr>
|
567
|
+
<td>
|
568
|
+
<pre class="lines">
|
569
|
+
|
570
|
+
|
571
|
+
29
|
572
|
+
30
|
573
|
+
31
|
574
|
+
32
|
575
|
+
33
|
576
|
+
34
|
577
|
+
35
|
578
|
+
36
|
579
|
+
37</pre>
|
580
|
+
</td>
|
581
|
+
<td>
|
582
|
+
<pre class="code"><span class="info file"># File 'lib/rack/blogengine/document.rb', line 29</span>
|
583
|
+
|
584
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_exec_content_operator'>exec_content_operator</span><span class='lparen'>(</span><span class='id identifier rubyid_documents'>documents</span><span class='comma'>,</span> <span class='id identifier rubyid_target'>target</span><span class='rparen'>)</span>
|
585
|
+
<span class='ivar'>@html</span><span class='period'>.</span><span class='id identifier rubyid_scan'>scan</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>\{\%(.*?)\%\}</span><span class='regexp_end'>/</span></span><span class='rparen'>)</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_contentoperator'>contentoperator</span><span class='op'>|</span>
|
586
|
+
<span class='id identifier rubyid_contentoperator'>contentoperator</span> <span class='op'>=</span> <span class='id identifier rubyid_contentoperator'>contentoperator</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_strip'>strip</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span>
|
587
|
+
<span class='id identifier rubyid_operator'>operator</span> <span class='op'>=</span> <span class='const'>Operator</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_target'>target</span><span class='rparen'>)</span>
|
588
|
+
<span class='id identifier rubyid_operatorhtml'>operatorhtml</span> <span class='op'>=</span> <span class='id identifier rubyid_operator'>operator</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='id identifier rubyid_contentoperator'>contentoperator</span><span class='comma'>,</span> <span class='id identifier rubyid_documents'>documents</span><span class='comma'>,</span> <span class='ivar'>@html</span><span class='rparen'>)</span>
|
589
|
+
|
590
|
+
<span class='ivar'>@html</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>{% </span><span class='tstring_end'>'</span></span> <span class='op'>+</span> <span class='id identifier rubyid_contentoperator'>contentoperator</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_content'> %}</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_operatorhtml'>operatorhtml</span>
|
591
|
+
<span class='kw'>end</span>
|
592
|
+
<span class='kw'>end</span></pre>
|
593
|
+
</td>
|
594
|
+
</tr>
|
595
|
+
</table>
|
596
|
+
</div>
|
597
|
+
|
598
|
+
<div class="method_details ">
|
599
|
+
<h3 class="signature " id="to_hash-instance_method">
|
600
|
+
|
601
|
+
- (<tt>Hash</tt>) <strong>to_hash</strong>
|
602
|
+
|
603
|
+
|
604
|
+
|
605
|
+
|
606
|
+
|
607
|
+
</h3><div class="docstring">
|
608
|
+
<div class="discussion">
|
609
|
+
|
610
|
+
<p>Converts Rack::Blogengine::Docuemnt to Hash</p>
|
611
|
+
|
612
|
+
|
613
|
+
</div>
|
614
|
+
</div>
|
615
|
+
<div class="tags">
|
616
|
+
|
617
|
+
<p class="tag_title">Returns:</p>
|
618
|
+
<ul class="return">
|
619
|
+
|
620
|
+
<li>
|
621
|
+
|
622
|
+
|
623
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
624
|
+
|
625
|
+
|
626
|
+
|
627
|
+
—
|
628
|
+
<div class='inline'>
|
629
|
+
<p>DocumentHashed [Document in Hash Presentation contains :path and :html]</p>
|
630
|
+
</div>
|
631
|
+
|
632
|
+
</li>
|
633
|
+
|
634
|
+
</ul>
|
635
|
+
|
636
|
+
</div><table class="source_code">
|
637
|
+
<tr>
|
638
|
+
<td>
|
639
|
+
<pre class="lines">
|
640
|
+
|
641
|
+
|
642
|
+
14
|
643
|
+
15
|
644
|
+
16
|
645
|
+
17
|
646
|
+
18
|
647
|
+
19
|
648
|
+
20
|
649
|
+
21
|
650
|
+
22</pre>
|
651
|
+
</td>
|
652
|
+
<td>
|
653
|
+
<pre class="code"><span class="info file"># File 'lib/rack/blogengine/document.rb', line 14</span>
|
654
|
+
|
655
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_to_hash'>to_hash</span>
|
656
|
+
<span class='id identifier rubyid_hash'>hash</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
657
|
+
<span class='id identifier rubyid_instance_variables'>instance_variables</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_var'>var</span><span class='op'>|</span>
|
658
|
+
<span class='kw'>unless</span> <span class='id identifier rubyid_var'>var</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_content'>@title</span><span class='tstring_end'>'</span></span> <span class='op'>||</span> <span class='id identifier rubyid_var'>var</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_content'>@date</span><span class='tstring_end'>'</span></span>
|
659
|
+
<span class='id identifier rubyid_hash'>hash</span><span class='lbracket'>[</span><span class='id identifier rubyid_var'>var</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</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><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_instance_variable_get'>instance_variable_get</span><span class='lparen'>(</span><span class='id identifier rubyid_var'>var</span><span class='rparen'>)</span>
|
660
|
+
<span class='kw'>end</span>
|
661
|
+
<span class='kw'>end</span>
|
662
|
+
<span class='id identifier rubyid_hash'>hash</span>
|
663
|
+
<span class='kw'>end</span></pre>
|
664
|
+
</td>
|
665
|
+
</tr>
|
666
|
+
</table>
|
667
|
+
</div>
|
668
|
+
|
669
|
+
</div>
|
670
|
+
|
671
|
+
</div>
|
672
|
+
|
673
|
+
<div id="footer">
|
674
|
+
Generated on Mon Apr 21 22:58:51 2014 by
|
675
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
676
|
+
0.8.7.4 (ruby-2.1.1).
|
677
|
+
</div>
|
678
|
+
|
679
|
+
</body>
|
680
|
+
</html>
|