mbrao 1.6.0 → 1.6.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (88) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +6 -1
  3. data/.travis-gemfile +2 -3
  4. data/.travis.yml +5 -3
  5. data/.yardopts +1 -1
  6. data/CHANGELOG.md +8 -0
  7. data/Gemfile +1 -1
  8. data/LICENSE.md +21 -0
  9. data/README.md +21 -16
  10. data/Rakefile +1 -1
  11. data/{doc → docs}/ActionView.html +1 -1
  12. data/{doc → docs}/ActionView/Template.html +1 -1
  13. data/{doc → docs}/ActionView/Template/Handlers.html +1 -1
  14. data/{doc → docs}/ActionView/Template/Handlers/MbraoTemplate.html +1 -1
  15. data/{doc → docs}/HTML.html +1 -1
  16. data/{doc → docs}/HTML/Pipeline.html +1 -1
  17. data/{doc → docs}/HTML/Pipeline/KramdownFilter.html +1 -1
  18. data/{doc → docs}/Mbrao.html +1 -1
  19. data/{doc → docs}/Mbrao/Author.html +1 -1
  20. data/{doc → docs}/Mbrao/Content.html +1 -1
  21. data/{doc → docs}/Mbrao/ContentInterface.html +1 -1
  22. data/{doc → docs}/Mbrao/ContentInterface/ClassMethods.html +1 -1
  23. data/{doc → docs}/Mbrao/Exceptions.html +1 -1
  24. data/{doc → docs}/Mbrao/Exceptions/InvalidDate.html +1 -1
  25. data/{doc → docs}/Mbrao/Exceptions/InvalidMetadata.html +1 -1
  26. data/{doc → docs}/Mbrao/Exceptions/Parsing.html +1 -1
  27. data/{doc → docs}/Mbrao/Exceptions/Rendering.html +1 -1
  28. data/{doc → docs}/Mbrao/Exceptions/UnavailableLocalization.html +1 -1
  29. data/{doc → docs}/Mbrao/Exceptions/Unimplemented.html +1 -1
  30. data/{doc → docs}/Mbrao/Exceptions/UnknownEngine.html +1 -1
  31. data/{doc → docs}/Mbrao/Parser.html +1 -1
  32. data/{doc → docs}/Mbrao/ParserInterface.html +1 -1
  33. data/{doc → docs}/Mbrao/ParserInterface/ClassMethods.html +1 -1
  34. data/{doc → docs}/Mbrao/ParserValidations.html +1 -1
  35. data/{doc → docs}/Mbrao/ParserValidations/ClassMethods.html +1 -1
  36. data/{doc → docs}/Mbrao/ParsingEngines.html +1 -1
  37. data/{doc → docs}/Mbrao/ParsingEngines/Base.html +1 -1
  38. data/{doc → docs}/Mbrao/ParsingEngines/PlainText.html +1 -1
  39. data/{doc → docs}/Mbrao/RenderingEngines.html +1 -1
  40. data/{doc → docs}/Mbrao/RenderingEngines/Base.html +1 -1
  41. data/{doc → docs}/Mbrao/RenderingEngines/HtmlPipeline.html +1 -1
  42. data/{doc → docs}/Mbrao/Version.html +1 -1
  43. data/{doc → docs}/_index.html +1 -1
  44. data/{doc → docs}/class_list.html +0 -0
  45. data/{doc → docs}/css/common.css +0 -0
  46. data/{doc → docs}/css/full_list.css +0 -0
  47. data/{doc → docs}/css/style.css +0 -0
  48. data/{doc → docs}/file.README.html +7 -5
  49. data/{doc → docs}/file_list.html +0 -0
  50. data/{doc → docs}/frames.html +0 -0
  51. data/{doc → docs}/index.html +7 -5
  52. data/{doc → docs}/js/app.js +0 -0
  53. data/{doc → docs}/js/full_list.js +0 -0
  54. data/{doc → docs}/js/jquery.js +0 -0
  55. data/{doc → docs}/method_list.html +0 -0
  56. data/{doc → docs}/top-level-namespace.html +1 -1
  57. data/lib/mbrao.rb +1 -1
  58. data/lib/mbrao/author.rb +1 -1
  59. data/lib/mbrao/content.rb +1 -1
  60. data/lib/mbrao/content_interface.rb +1 -1
  61. data/lib/mbrao/exceptions.rb +1 -1
  62. data/lib/mbrao/integrations/rails.rb +1 -1
  63. data/lib/mbrao/parser.rb +1 -1
  64. data/lib/mbrao/parser_interface.rb +1 -1
  65. data/lib/mbrao/parser_validations.rb +1 -1
  66. data/lib/mbrao/parsing_engines/base.rb +1 -1
  67. data/lib/mbrao/parsing_engines/plain_text.rb +1 -1
  68. data/lib/mbrao/rendering_engines/base.rb +1 -1
  69. data/lib/mbrao/rendering_engines/html_pipeline.rb +1 -1
  70. data/lib/mbrao/rendering_engines/html_pipeline/kramdown_filter.rb +1 -1
  71. data/lib/mbrao/version.rb +2 -2
  72. data/mbrao.gemspec +1 -1
  73. data/spec/mbrao/author_spec.rb +1 -1
  74. data/spec/mbrao/content_spec.rb +1 -1
  75. data/spec/mbrao/integrations/rails_spec.rb +1 -1
  76. data/spec/mbrao/parser_spec.rb +1 -1
  77. data/spec/mbrao/parsing_engines/base_spec.rb +1 -1
  78. data/spec/mbrao/parsing_engines/plain_text_spec.rb +1 -1
  79. data/spec/mbrao/rendering_engines/base_spec.rb +1 -1
  80. data/spec/mbrao/rendering_engines/html_pipeline/kramdown_filter_spec.rb +1 -1
  81. data/spec/mbrao/rendering_engines/html_pipeline_spec.rb +1 -1
  82. data/spec/spec_helper.rb +1 -1
  83. metadata +50 -54
  84. data/doc/Mbrao/ContentPublicInterface.html +0 -662
  85. data/doc/Mbrao/PublicInterface.html +0 -134
  86. data/doc/Mbrao/PublicInterface/ClassMethods.html +0 -1715
  87. data/doc/Mbrao/Validations.html +0 -134
  88. data/doc/Mbrao/Validations/ClassMethods.html +0 -354
@@ -1,662 +0,0 @@
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
- Module: Mbrao::ContentPublicInterface
8
-
9
- &mdash; 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#!Mbrao/ContentPublicInterface.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 (C)</a> &raquo;
35
- <span class='title'><span class='object_link'><a href="../Mbrao.html" title="Mbrao (module)">Mbrao</a></span></span>
36
- &raquo;
37
- <span class="title">ContentPublicInterface</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>Module: Mbrao::ContentPublicInterface
67
-
68
-
69
-
70
- </h1>
71
-
72
- <dl class="box">
73
-
74
-
75
-
76
-
77
-
78
-
79
-
80
- <dt class="r1">Included in:</dt>
81
- <dd class="r1"><span class='object_link'><a href="Content.html" title="Mbrao::Content (class)">Content</a></span></dd>
82
-
83
-
84
-
85
- <dt class="r2 last">Defined in:</dt>
86
- <dd class="r2 last">lib/mbrao/content.rb</dd>
87
-
88
- </dl>
89
- <div class="clear"></div>
90
-
91
- <h2>Overview</h2><div class="docstring">
92
- <div class="discussion">
93
- <p>Setter methods for the <span class='object_link'><a href="Content.html" title="Mbrao::Content (class)">Content</a></span> class.</p>
94
-
95
-
96
- </div>
97
- </div>
98
- <div class="tags">
99
-
100
-
101
- </div>
102
-
103
-
104
-
105
-
106
-
107
-
108
-
109
- <h2>
110
- Instance Method Summary
111
- <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
112
- </h2>
113
-
114
- <ul class="summary">
115
-
116
- <li class="public ">
117
- <span class="summary_signature">
118
-
119
- <a href="#enabled_for_locales%3F-instance_method" title="#enabled_for_locales? (instance method)">- (Boolean) <strong>enabled_for_locales?</strong>(*locales) </a>
120
-
121
-
122
-
123
- </span>
124
-
125
-
126
-
127
-
128
-
129
-
130
-
131
-
132
-
133
- <span class="summary_desc"><div class='inline'><p>Checks if the content is available for at least one of the provided locales.</p>
134
- </div></span>
135
-
136
- </li>
137
-
138
-
139
- <li class="public ">
140
- <span class="summary_signature">
141
-
142
- <a href="#get_body-instance_method" title="#get_body (instance method)">- (String|HashWithIndifferentAccess) <strong>get_body</strong>(locales = [], engine = :plain_text) </a>
143
-
144
-
145
-
146
- </span>
147
-
148
-
149
-
150
-
151
-
152
-
153
-
154
-
155
-
156
- <span class="summary_desc"><div class='inline'><p>Gets the body returning only the portion which are available for the given locales.</p>
157
- </div></span>
158
-
159
- </li>
160
-
161
-
162
- <li class="public ">
163
- <span class="summary_signature">
164
-
165
- <a href="#get_more-instance_method" title="#get_more (instance method)">- (String|HashWithIndifferentAccess) <strong>get_more</strong>(locales = []) </a>
166
-
167
-
168
-
169
- </span>
170
-
171
-
172
-
173
-
174
-
175
-
176
-
177
-
178
-
179
- <span class="summary_desc"><div class='inline'><p>Gets the “more link” text of the content in the desired locales.</p>
180
- </div></span>
181
-
182
- </li>
183
-
184
-
185
- <li class="public ">
186
- <span class="summary_signature">
187
-
188
- <a href="#get_tags-instance_method" title="#get_tags (instance method)">- (Array|HashWithIndifferentAccess) <strong>get_tags</strong>(locales = []) </a>
189
-
190
-
191
-
192
- </span>
193
-
194
-
195
-
196
-
197
-
198
-
199
-
200
-
201
-
202
- <span class="summary_desc"><div class='inline'><p>Gets the tags of the content in the desired locales.</p>
203
- </div></span>
204
-
205
- </li>
206
-
207
-
208
- <li class="public ">
209
- <span class="summary_signature">
210
-
211
- <a href="#get_title-instance_method" title="#get_title (instance method)">- (String|HashWithIndifferentAccess) <strong>get_title</strong>(locales = []) </a>
212
-
213
-
214
-
215
- </span>
216
-
217
-
218
-
219
-
220
-
221
-
222
-
223
-
224
-
225
- <span class="summary_desc"><div class='inline'><p>Gets the title of the content in the desired locales.</p>
226
- </div></span>
227
-
228
- </li>
229
-
230
-
231
- </ul>
232
-
233
-
234
-
235
-
236
- <div id="instance_method_details" class="method_details_list">
237
- <h2>Instance Method Details</h2>
238
-
239
-
240
- <div class="method_details first">
241
- <h3 class="signature first" id="enabled_for_locales?-instance_method">
242
-
243
- - (<tt>Boolean</tt>) <strong>enabled_for_locales?</strong>(*locales)
244
-
245
-
246
-
247
-
248
-
249
- </h3><div class="docstring">
250
- <div class="discussion">
251
- <p>Checks if the content is available for at least one of the provided locales.</p>
252
-
253
-
254
- </div>
255
- </div>
256
- <div class="tags">
257
- <p class="tag_title">Parameters:</p>
258
- <ul class="param">
259
-
260
- <li>
261
-
262
- <span class='name'>locales</span>
263
-
264
-
265
- <span class='type'>(<tt>Array</tt>)</span>
266
-
267
-
268
-
269
- &mdash;
270
- <div class='inline'><p>The desired locales. Can include <code>*</code> to match all. If none are specified, the default mbrao locale will be used.</p>
271
- </div>
272
-
273
- </li>
274
-
275
- </ul>
276
-
277
- <p class="tag_title">Returns:</p>
278
- <ul class="return">
279
-
280
- <li>
281
-
282
-
283
- <span class='type'>(<tt>Boolean</tt>)</span>
284
-
285
-
286
-
287
- &mdash;
288
- <div class='inline'><p><code>true</code> if the content is available for at least one of the desired locales, <code>false</code> otherwise.</p>
289
- </div>
290
-
291
- </li>
292
-
293
- </ul>
294
-
295
- </div><table class="source_code">
296
- <tr>
297
- <td>
298
- <pre class="lines">
299
-
300
-
301
- 14
302
- 15
303
- 16
304
- 17</pre>
305
- </td>
306
- <td>
307
- <pre class="code"><span class="info file"># File 'lib/mbrao/content.rb', line 14</span>
308
-
309
- <span class='kw'>def</span> <span class='id identifier rubyid_enabled_for_locales?'>enabled_for_locales?</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_locales'>locales</span><span class='rparen'>)</span>
310
- <span class='id identifier rubyid_locales'>locales</span> <span class='op'>=</span> <span class='id identifier rubyid_locales'>locales</span><span class='period'>.</span><span class='id identifier rubyid_flatten'>flatten</span><span class='period'>.</span><span class='id identifier rubyid_ensure_array'>ensure_array</span><span class='lparen'>(</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='kw'>true</span><span class='rparen'>)</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_l'>l</span><span class='op'>|</span> <span class='id identifier rubyid_l'>l</span><span class='period'>.</span><span class='id identifier rubyid_ensure_string'>ensure_string</span><span class='period'>.</span><span class='id identifier rubyid_strip'>strip</span> <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_reject'>reject</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_l'>l</span><span class='op'>|</span> <span class='id identifier rubyid_l'>l</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>*</span><span class='tstring_end'>&quot;</span></span> <span class='rbrace'>}</span>
311
- <span class='ivar'>@locales</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span> <span class='op'>||</span> <span class='id identifier rubyid_locales'>locales</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span> <span class='op'>||</span> <span class='lparen'>(</span><span class='ivar'>@locales</span> <span class='op'>&amp;</span> <span class='id identifier rubyid_locales'>locales</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_present?'>present?</span>
312
- <span class='kw'>end</span></pre>
313
- </td>
314
- </tr>
315
- </table>
316
- </div>
317
-
318
- <div class="method_details ">
319
- <h3 class="signature " id="get_body-instance_method">
320
-
321
- - (<tt>String|HashWithIndifferentAccess</tt>) <strong>get_body</strong>(locales = [], engine = :plain_text)
322
-
323
-
324
-
325
-
326
-
327
- </h3><div class="docstring">
328
- <div class="discussion">
329
- <p>Gets the body returning only the portion which are available for the given locales.</p>
330
-
331
-
332
- </div>
333
- </div>
334
- <div class="tags">
335
- <p class="tag_title">Parameters:</p>
336
- <ul class="param">
337
-
338
- <li>
339
-
340
- <span class='name'>locales</span>
341
-
342
-
343
- <span class='type'>(<tt>String|Array</tt>)</span>
344
-
345
-
346
- <em class="default">(defaults to: <tt>[]</tt>)</em>
347
-
348
-
349
- &mdash;
350
- <div class='inline'><p>The desired locales. Can include <code>*</code> to match all. If none are specified, the default mbrao locale will be used.</p>
351
- </div>
352
-
353
- </li>
354
-
355
- <li>
356
-
357
- <span class='name'>engine</span>
358
-
359
-
360
- <span class='type'>(<tt>String|Symbol|Object</tt>)</span>
361
-
362
-
363
- <em class="default">(defaults to: <tt>:plain_text</tt>)</em>
364
-
365
-
366
- &mdash;
367
- <div class='inline'><p>The engine to use to filter contents.</p>
368
- </div>
369
-
370
- </li>
371
-
372
- </ul>
373
-
374
- <p class="tag_title">Returns:</p>
375
- <ul class="return">
376
-
377
- <li>
378
-
379
-
380
- <span class='type'>(<tt>String|HashWithIndifferentAccess</tt>)</span>
381
-
382
-
383
-
384
- &mdash;
385
- <div class='inline'><p>Return the body of the content in the desired locales. If only one locale is required, then a <code>String</code>
386
- is returned, else a <code>HashWithIndifferentAccess</code> with locales as keys.</p>
387
- </div>
388
-
389
- </li>
390
-
391
- </ul>
392
-
393
- </div><table class="source_code">
394
- <tr>
395
- <td>
396
- <pre class="lines">
397
-
398
-
399
- 34
400
- 35
401
- 36</pre>
402
- </td>
403
- <td>
404
- <pre class="code"><span class="info file"># File 'lib/mbrao/content.rb', line 34</span>
405
-
406
- <span class='kw'>def</span> <span class='id identifier rubyid_get_body'>get_body</span><span class='lparen'>(</span><span class='id identifier rubyid_locales'>locales</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_engine'>engine</span> <span class='op'>=</span> <span class='symbol'>:plain_text</span><span class='rparen'>)</span>
407
- <span class='const'>Mbrao</span><span class='op'>::</span><span class='const'>Parser</span><span class='period'>.</span><span class='id identifier rubyid_create_engine'>create_engine</span><span class='lparen'>(</span><span class='id identifier rubyid_engine'>engine</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_filter_content'>filter_content</span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span> <span class='id identifier rubyid_locales'>locales</span><span class='rparen'>)</span>
408
- <span class='kw'>end</span></pre>
409
- </td>
410
- </tr>
411
- </table>
412
- </div>
413
-
414
- <div class="method_details ">
415
- <h3 class="signature " id="get_more-instance_method">
416
-
417
- - (<tt>String|HashWithIndifferentAccess</tt>) <strong>get_more</strong>(locales = [])
418
-
419
-
420
-
421
-
422
-
423
- </h3><div class="docstring">
424
- <div class="discussion">
425
- <p>Gets the “more link” text of the content in the desired locales.</p>
426
-
427
-
428
- </div>
429
- </div>
430
- <div class="tags">
431
- <p class="tag_title">Parameters:</p>
432
- <ul class="param">
433
-
434
- <li>
435
-
436
- <span class='name'>locales</span>
437
-
438
-
439
- <span class='type'>(<tt>String|Array</tt>)</span>
440
-
441
-
442
- <em class="default">(defaults to: <tt>[]</tt>)</em>
443
-
444
-
445
- &mdash;
446
- <div class='inline'><p>The desired locales. Can include <code>*</code> to match all. If none are specified, the default mbrao locale will be used.</p>
447
- </div>
448
-
449
- </li>
450
-
451
- </ul>
452
-
453
- <p class="tag_title">Returns:</p>
454
- <ul class="return">
455
-
456
- <li>
457
-
458
-
459
- <span class='type'>(<tt>String|HashWithIndifferentAccess</tt>)</span>
460
-
461
-
462
-
463
- &mdash;
464
- <div class='inline'><p>Return the label of the “more link” of the content in the desired locales. If only one locale is required,
465
- then a <code>String</code> is returned, else a <code>HashWithIndifferentAccess</code> with locales as keys.</p>
466
- </div>
467
-
468
- </li>
469
-
470
- </ul>
471
-
472
- </div><table class="source_code">
473
- <tr>
474
- <td>
475
- <pre class="lines">
476
-
477
-
478
- 52
479
- 53
480
- 54</pre>
481
- </td>
482
- <td>
483
- <pre class="code"><span class="info file"># File 'lib/mbrao/content.rb', line 52</span>
484
-
485
- <span class='kw'>def</span> <span class='id identifier rubyid_get_more'>get_more</span><span class='lparen'>(</span><span class='id identifier rubyid_locales'>locales</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span>
486
- <span class='id identifier rubyid_filter_attribute_for_locales'>filter_attribute_for_locales</span><span class='lparen'>(</span><span class='ivar'>@more</span><span class='comma'>,</span> <span class='id identifier rubyid_locales'>locales</span><span class='rparen'>)</span>
487
- <span class='kw'>end</span></pre>
488
- </td>
489
- </tr>
490
- </table>
491
- </div>
492
-
493
- <div class="method_details ">
494
- <h3 class="signature " id="get_tags-instance_method">
495
-
496
- - (<tt>Array|HashWithIndifferentAccess</tt>) <strong>get_tags</strong>(locales = [])
497
-
498
-
499
-
500
-
501
-
502
- </h3><div class="docstring">
503
- <div class="discussion">
504
- <p>Gets the tags of the content in the desired locales.</p>
505
-
506
-
507
- </div>
508
- </div>
509
- <div class="tags">
510
- <p class="tag_title">Parameters:</p>
511
- <ul class="param">
512
-
513
- <li>
514
-
515
- <span class='name'>locales</span>
516
-
517
-
518
- <span class='type'>(<tt>String|Array</tt>)</span>
519
-
520
-
521
- <em class="default">(defaults to: <tt>[]</tt>)</em>
522
-
523
-
524
- &mdash;
525
- <div class='inline'><p>The desired locales. Can include <code>*</code> to match all. If none are specified, the default mbrao locale will be used.</p>
526
- </div>
527
-
528
- </li>
529
-
530
- </ul>
531
-
532
- <p class="tag_title">Returns:</p>
533
- <ul class="return">
534
-
535
- <li>
536
-
537
-
538
- <span class='type'>(<tt>Array|HashWithIndifferentAccess</tt>)</span>
539
-
540
-
541
-
542
- &mdash;
543
- <div class='inline'><p>Return the title of the content in the desired locales. If only one locale is required, then a <code>Array</code>
544
- is returned, else a <code>HashWithIndifferentAccess</code> with locales as keys.</p>
545
- </div>
546
-
547
- </li>
548
-
549
- </ul>
550
-
551
- </div><table class="source_code">
552
- <tr>
553
- <td>
554
- <pre class="lines">
555
-
556
-
557
- 43
558
- 44
559
- 45</pre>
560
- </td>
561
- <td>
562
- <pre class="code"><span class="info file"># File 'lib/mbrao/content.rb', line 43</span>
563
-
564
- <span class='kw'>def</span> <span class='id identifier rubyid_get_tags'>get_tags</span><span class='lparen'>(</span><span class='id identifier rubyid_locales'>locales</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span>
565
- <span class='id identifier rubyid_filter_attribute_for_locales'>filter_attribute_for_locales</span><span class='lparen'>(</span><span class='ivar'>@tags</span><span class='comma'>,</span> <span class='id identifier rubyid_locales'>locales</span><span class='rparen'>)</span>
566
- <span class='kw'>end</span></pre>
567
- </td>
568
- </tr>
569
- </table>
570
- </div>
571
-
572
- <div class="method_details ">
573
- <h3 class="signature " id="get_title-instance_method">
574
-
575
- - (<tt>String|HashWithIndifferentAccess</tt>) <strong>get_title</strong>(locales = [])
576
-
577
-
578
-
579
-
580
-
581
- </h3><div class="docstring">
582
- <div class="discussion">
583
- <p>Gets the title of the content in the desired locales.</p>
584
-
585
-
586
- </div>
587
- </div>
588
- <div class="tags">
589
- <p class="tag_title">Parameters:</p>
590
- <ul class="param">
591
-
592
- <li>
593
-
594
- <span class='name'>locales</span>
595
-
596
-
597
- <span class='type'>(<tt>String|Array</tt>)</span>
598
-
599
-
600
- <em class="default">(defaults to: <tt>[]</tt>)</em>
601
-
602
-
603
- &mdash;
604
- <div class='inline'><p>The desired locales. Can include <code>*</code> to match all. If none are specified, the default mbrao locale will be used.</p>
605
- </div>
606
-
607
- </li>
608
-
609
- </ul>
610
-
611
- <p class="tag_title">Returns:</p>
612
- <ul class="return">
613
-
614
- <li>
615
-
616
-
617
- <span class='type'>(<tt>String|HashWithIndifferentAccess</tt>)</span>
618
-
619
-
620
-
621
- &mdash;
622
- <div class='inline'><p>Return the title of the content in the desired locales. If only one locale is required, then a <code>String</code>
623
- is returned, else a <code>HashWithIndifferentAccess</code> with locales as keys.</p>
624
- </div>
625
-
626
- </li>
627
-
628
- </ul>
629
-
630
- </div><table class="source_code">
631
- <tr>
632
- <td>
633
- <pre class="lines">
634
-
635
-
636
- 24
637
- 25
638
- 26</pre>
639
- </td>
640
- <td>
641
- <pre class="code"><span class="info file"># File 'lib/mbrao/content.rb', line 24</span>
642
-
643
- <span class='kw'>def</span> <span class='id identifier rubyid_get_title'>get_title</span><span class='lparen'>(</span><span class='id identifier rubyid_locales'>locales</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span>
644
- <span class='id identifier rubyid_filter_attribute_for_locales'>filter_attribute_for_locales</span><span class='lparen'>(</span><span class='ivar'>@title</span><span class='comma'>,</span> <span class='id identifier rubyid_locales'>locales</span><span class='rparen'>)</span>
645
- <span class='kw'>end</span></pre>
646
- </td>
647
- </tr>
648
- </table>
649
- </div>
650
-
651
- </div>
652
-
653
- </div>
654
-
655
- <div id="footer">
656
- Generated on Wed Apr 9 21:36:00 2014 by
657
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
658
- 0.8.7.4 (ruby-2.1.0).
659
- </div>
660
-
661
- </body>
662
- </html>