mbrao 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. data/.gitignore +6 -0
  2. data/.travis-gemfile +13 -0
  3. data/.travis.yml +8 -0
  4. data/.yardopts +1 -0
  5. data/Gemfile +21 -0
  6. data/README.md +60 -0
  7. data/Rakefile +11 -0
  8. data/doc/ActionView/Template/Handlers/MbraoTemplate.html +568 -0
  9. data/doc/ActionView/Template/Handlers.html +125 -0
  10. data/doc/HTML/Pipeline/KramdownFilter.html +354 -0
  11. data/doc/HTML/Pipeline.html +140 -0
  12. data/doc/HTML.html +125 -0
  13. data/doc/Mbrao/Author.html +1402 -0
  14. data/doc/Mbrao/Content.html +4779 -0
  15. data/doc/Mbrao/ContentPublicInterface.html +658 -0
  16. data/doc/Mbrao/Exceptions/InvalidDate.html +133 -0
  17. data/doc/Mbrao/Exceptions/InvalidMetadata.html +133 -0
  18. data/doc/Mbrao/Exceptions/Parsing.html +133 -0
  19. data/doc/Mbrao/Exceptions/Rendering.html +133 -0
  20. data/doc/Mbrao/Exceptions/UnavailableLocalization.html +133 -0
  21. data/doc/Mbrao/Exceptions/Unimplemented.html +133 -0
  22. data/doc/Mbrao/Exceptions/UnknownEngine.html +133 -0
  23. data/doc/Mbrao/Exceptions.html +125 -0
  24. data/doc/Mbrao/Parser.html +418 -0
  25. data/doc/Mbrao/ParsingEngines/Base.html +658 -0
  26. data/doc/Mbrao/ParsingEngines/PlainText.html +571 -0
  27. data/doc/Mbrao/ParsingEngines.html +127 -0
  28. data/doc/Mbrao/PublicInterface/ClassMethods.html +1727 -0
  29. data/doc/Mbrao/PublicInterface.html +134 -0
  30. data/doc/Mbrao/RenderingEngines/Base.html +280 -0
  31. data/doc/Mbrao/RenderingEngines/HtmlPipeline.html +873 -0
  32. data/doc/Mbrao/RenderingEngines.html +127 -0
  33. data/doc/Mbrao/Validations/ClassMethods.html +692 -0
  34. data/doc/Mbrao/Validations.html +134 -0
  35. data/doc/Mbrao/Version.html +189 -0
  36. data/doc/Mbrao.html +130 -0
  37. data/doc/_index.html +395 -0
  38. data/doc/class_list.html +53 -0
  39. data/doc/css/common.css +1 -0
  40. data/doc/css/full_list.css +57 -0
  41. data/doc/css/style.css +338 -0
  42. data/doc/file.README.html +135 -0
  43. data/doc/file_list.html +55 -0
  44. data/doc/frames.html +28 -0
  45. data/doc/index.html +135 -0
  46. data/doc/js/app.js +214 -0
  47. data/doc/js/full_list.js +173 -0
  48. data/doc/js/jquery.js +4 -0
  49. data/doc/method_list.html +516 -0
  50. data/doc/top-level-namespace.html +112 -0
  51. data/lib/mbrao/author.rb +61 -0
  52. data/lib/mbrao/content.rb +300 -0
  53. data/lib/mbrao/exceptions.rb +38 -0
  54. data/lib/mbrao/integrations/rails.rb +51 -0
  55. data/lib/mbrao/parser.rb +276 -0
  56. data/lib/mbrao/parsing_engines/base.rb +51 -0
  57. data/lib/mbrao/parsing_engines/plain_text.rb +187 -0
  58. data/lib/mbrao/rendering_engines/base.rb +22 -0
  59. data/lib/mbrao/rendering_engines/html_pipeline.rb +147 -0
  60. data/lib/mbrao/version.rb +25 -0
  61. data/lib/mbrao.rb +24 -0
  62. data/mbrao.gemspec +31 -0
  63. data/spec/coverage_helper.rb +17 -0
  64. data/spec/mbrao/author_spec.rb +62 -0
  65. data/spec/mbrao/content_spec.rb +280 -0
  66. data/spec/mbrao/integrations/rails_spec.rb +92 -0
  67. data/spec/mbrao/parser_spec.rb +269 -0
  68. data/spec/mbrao/parsing_engines/base_spec.rb +52 -0
  69. data/spec/mbrao/parsing_engines/plain_text_spec.rb +141 -0
  70. data/spec/mbrao/rendering_engines/base_spec.rb +17 -0
  71. data/spec/mbrao/rendering_engines/html_pipeline_spec.rb +128 -0
  72. data/spec/spec_helper.rb +15 -0
  73. metadata +195 -0
@@ -0,0 +1,658 @@
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.5.2
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" 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#!" + escape(window.location.href);
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 &#8220;more link&#8221; 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='const'>Mbrao</span><span class='op'>::</span><span class='const'>Parser</span><span class='period'>.</span><span class='id identifier rubyid_sanitized_array'>sanitized_array</span><span class='lparen'>(</span><span class='id identifier rubyid_locales'>locales</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_collect'>collect</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='symbol'>:strip</span><span class='rparen'>)</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> is returned, else a <code>HashWithIndifferentAccess</code> with locales as keys.</p>
386
+ </div>
387
+
388
+ </li>
389
+
390
+ </ul>
391
+
392
+ </div><table class="source_code">
393
+ <tr>
394
+ <td>
395
+ <pre class="lines">
396
+
397
+
398
+ 32
399
+ 33
400
+ 34</pre>
401
+ </td>
402
+ <td>
403
+ <pre class="code"><span class="info file"># File 'lib/mbrao/content.rb', line 32</span>
404
+
405
+ <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>
406
+ <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>
407
+ <span class='kw'>end</span></pre>
408
+ </td>
409
+ </tr>
410
+ </table>
411
+ </div>
412
+
413
+ <div class="method_details ">
414
+ <h3 class="signature " id="get_more-instance_method">
415
+
416
+ - (<tt>String|HashWithIndifferentAccess</tt>) <strong>get_more</strong>(locales = [])
417
+
418
+
419
+
420
+
421
+
422
+ </h3><div class="docstring">
423
+ <div class="discussion">
424
+ <p>Gets the &#8220;more link&#8221; text of the content in the desired locales.</p>
425
+
426
+
427
+ </div>
428
+ </div>
429
+ <div class="tags">
430
+ <p class="tag_title">Parameters:</p>
431
+ <ul class="param">
432
+
433
+ <li>
434
+
435
+ <span class='name'>locales</span>
436
+
437
+
438
+ <span class='type'>(<tt>String|Array</tt>)</span>
439
+
440
+
441
+ <em class="default">(defaults to: <tt>[]</tt>)</em>
442
+
443
+
444
+ &mdash;
445
+ <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>
446
+ </div>
447
+
448
+ </li>
449
+
450
+ </ul>
451
+
452
+ <p class="tag_title">Returns:</p>
453
+ <ul class="return">
454
+
455
+ <li>
456
+
457
+
458
+ <span class='type'>(<tt>String|HashWithIndifferentAccess</tt>)</span>
459
+
460
+
461
+
462
+ &mdash;
463
+ <div class='inline'><p>Return the label of the “more link” of the content in the desired locales. If only one locale is required, then a <code>String</code> is returned, else a <code>HashWithIndifferentAccess</code> with locales as keys.</p>
464
+ </div>
465
+
466
+ </li>
467
+
468
+ </ul>
469
+
470
+ </div><table class="source_code">
471
+ <tr>
472
+ <td>
473
+ <pre class="lines">
474
+
475
+
476
+ 48
477
+ 49
478
+ 50</pre>
479
+ </td>
480
+ <td>
481
+ <pre class="code"><span class="info file"># File 'lib/mbrao/content.rb', line 48</span>
482
+
483
+ <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>
484
+ <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>
485
+ <span class='kw'>end</span></pre>
486
+ </td>
487
+ </tr>
488
+ </table>
489
+ </div>
490
+
491
+ <div class="method_details ">
492
+ <h3 class="signature " id="get_tags-instance_method">
493
+
494
+ - (<tt>Array|HashWithIndifferentAccess</tt>) <strong>get_tags</strong>(locales = [])
495
+
496
+
497
+
498
+
499
+
500
+ </h3><div class="docstring">
501
+ <div class="discussion">
502
+ <p>Gets the tags of the content in the desired locales.</p>
503
+
504
+
505
+ </div>
506
+ </div>
507
+ <div class="tags">
508
+ <p class="tag_title">Parameters:</p>
509
+ <ul class="param">
510
+
511
+ <li>
512
+
513
+ <span class='name'>locales</span>
514
+
515
+
516
+ <span class='type'>(<tt>String|Array</tt>)</span>
517
+
518
+
519
+ <em class="default">(defaults to: <tt>[]</tt>)</em>
520
+
521
+
522
+ &mdash;
523
+ <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>
524
+ </div>
525
+
526
+ </li>
527
+
528
+ </ul>
529
+
530
+ <p class="tag_title">Returns:</p>
531
+ <ul class="return">
532
+
533
+ <li>
534
+
535
+
536
+ <span class='type'>(<tt>Array|HashWithIndifferentAccess</tt>)</span>
537
+
538
+
539
+
540
+ &mdash;
541
+ <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> is returned, else a <code>HashWithIndifferentAccess</code> with locales as keys.</p>
542
+ </div>
543
+
544
+ </li>
545
+
546
+ </ul>
547
+
548
+ </div><table class="source_code">
549
+ <tr>
550
+ <td>
551
+ <pre class="lines">
552
+
553
+
554
+ 40
555
+ 41
556
+ 42</pre>
557
+ </td>
558
+ <td>
559
+ <pre class="code"><span class="info file"># File 'lib/mbrao/content.rb', line 40</span>
560
+
561
+ <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>
562
+ <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>
563
+ <span class='kw'>end</span></pre>
564
+ </td>
565
+ </tr>
566
+ </table>
567
+ </div>
568
+
569
+ <div class="method_details ">
570
+ <h3 class="signature " id="get_title-instance_method">
571
+
572
+ - (<tt>String|HashWithIndifferentAccess</tt>) <strong>get_title</strong>(locales = [])
573
+
574
+
575
+
576
+
577
+
578
+ </h3><div class="docstring">
579
+ <div class="discussion">
580
+ <p>Gets the title of the content in the desired locales.</p>
581
+
582
+
583
+ </div>
584
+ </div>
585
+ <div class="tags">
586
+ <p class="tag_title">Parameters:</p>
587
+ <ul class="param">
588
+
589
+ <li>
590
+
591
+ <span class='name'>locales</span>
592
+
593
+
594
+ <span class='type'>(<tt>String|Array</tt>)</span>
595
+
596
+
597
+ <em class="default">(defaults to: <tt>[]</tt>)</em>
598
+
599
+
600
+ &mdash;
601
+ <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>
602
+ </div>
603
+
604
+ </li>
605
+
606
+ </ul>
607
+
608
+ <p class="tag_title">Returns:</p>
609
+ <ul class="return">
610
+
611
+ <li>
612
+
613
+
614
+ <span class='type'>(<tt>String|HashWithIndifferentAccess</tt>)</span>
615
+
616
+
617
+
618
+ &mdash;
619
+ <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> is returned, else a <code>HashWithIndifferentAccess</code> with locales as keys.</p>
620
+ </div>
621
+
622
+ </li>
623
+
624
+ </ul>
625
+
626
+ </div><table class="source_code">
627
+ <tr>
628
+ <td>
629
+ <pre class="lines">
630
+
631
+
632
+ 23
633
+ 24
634
+ 25</pre>
635
+ </td>
636
+ <td>
637
+ <pre class="code"><span class="info file"># File 'lib/mbrao/content.rb', line 23</span>
638
+
639
+ <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>
640
+ <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>
641
+ <span class='kw'>end</span></pre>
642
+ </td>
643
+ </tr>
644
+ </table>
645
+ </div>
646
+
647
+ </div>
648
+
649
+ </div>
650
+
651
+ <div id="footer">
652
+ Generated on Fri Mar 1 09:13:30 2013 by
653
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
654
+ 0.8.5.2 (ruby-1.9.3).
655
+ </div>
656
+
657
+ </body>
658
+ </html>