mbrao 1.3.0 → 1.4.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 (40) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -0
  3. data/doc/ActionView/Template/Handlers/MbraoTemplate.html +1 -1
  4. data/doc/ActionView/Template/Handlers.html +1 -1
  5. data/doc/HTML/Pipeline/KramdownFilter.html +1 -1
  6. data/doc/HTML/Pipeline.html +1 -1
  7. data/doc/HTML.html +1 -1
  8. data/doc/Mbrao/Author.html +1 -1
  9. data/doc/Mbrao/Content.html +958 -259
  10. data/doc/Mbrao/ContentPublicInterface.html +1 -1
  11. data/doc/Mbrao/Exceptions/InvalidDate.html +1 -1
  12. data/doc/Mbrao/Exceptions/InvalidMetadata.html +1 -1
  13. data/doc/Mbrao/Exceptions/Parsing.html +1 -1
  14. data/doc/Mbrao/Exceptions/Rendering.html +1 -1
  15. data/doc/Mbrao/Exceptions/UnavailableLocalization.html +1 -1
  16. data/doc/Mbrao/Exceptions/Unimplemented.html +1 -1
  17. data/doc/Mbrao/Exceptions/UnknownEngine.html +1 -1
  18. data/doc/Mbrao/Exceptions.html +1 -1
  19. data/doc/Mbrao/Parser.html +1 -1
  20. data/doc/Mbrao/ParsingEngines/Base.html +1 -1
  21. data/doc/Mbrao/ParsingEngines/PlainText.html +1 -1
  22. data/doc/Mbrao/ParsingEngines.html +1 -1
  23. data/doc/Mbrao/PublicInterface/ClassMethods.html +1 -1
  24. data/doc/Mbrao/PublicInterface.html +1 -1
  25. data/doc/Mbrao/RenderingEngines/Base.html +1 -1
  26. data/doc/Mbrao/RenderingEngines/HtmlPipeline.html +1 -1
  27. data/doc/Mbrao/RenderingEngines.html +1 -1
  28. data/doc/Mbrao/Validations/ClassMethods.html +1 -1
  29. data/doc/Mbrao/Validations.html +1 -1
  30. data/doc/Mbrao/Version.html +2 -2
  31. data/doc/Mbrao.html +1 -1
  32. data/doc/_index.html +1 -1
  33. data/doc/file.README.html +1 -1
  34. data/doc/index.html +1 -1
  35. data/doc/method_list.html +53 -47
  36. data/doc/top-level-namespace.html +1 -1
  37. data/lib/mbrao/content.rb +18 -8
  38. data/lib/mbrao/version.rb +1 -1
  39. data/spec/mbrao/content_spec.rb +10 -2
  40. metadata +1 -1
@@ -653,7 +653,7 @@ is returned, else a <code>HashWithIndifferentAccess</code> with locales as keys.
653
653
  </div>
654
654
 
655
655
  <div id="footer">
656
- Generated on Sun Nov 24 14:07:03 2013 by
656
+ Generated on Sun Nov 24 14:38:52 2013 by
657
657
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
658
658
  0.8.7.3 (ruby-2.0.0).
659
659
  </div>
@@ -124,7 +124,7 @@
124
124
  </div>
125
125
 
126
126
  <div id="footer">
127
- Generated on Sun Nov 24 14:07:04 2013 by
127
+ Generated on Sun Nov 24 14:38:52 2013 by
128
128
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
129
129
  0.8.7.3 (ruby-2.0.0).
130
130
  </div>
@@ -124,7 +124,7 @@
124
124
  </div>
125
125
 
126
126
  <div id="footer">
127
- Generated on Sun Nov 24 14:07:04 2013 by
127
+ Generated on Sun Nov 24 14:38:52 2013 by
128
128
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
129
129
  0.8.7.3 (ruby-2.0.0).
130
130
  </div>
@@ -124,7 +124,7 @@
124
124
  </div>
125
125
 
126
126
  <div id="footer">
127
- Generated on Sun Nov 24 14:07:04 2013 by
127
+ Generated on Sun Nov 24 14:38:52 2013 by
128
128
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
129
129
  0.8.7.3 (ruby-2.0.0).
130
130
  </div>
@@ -124,7 +124,7 @@
124
124
  </div>
125
125
 
126
126
  <div id="footer">
127
- Generated on Sun Nov 24 14:07:04 2013 by
127
+ Generated on Sun Nov 24 14:38:52 2013 by
128
128
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
129
129
  0.8.7.3 (ruby-2.0.0).
130
130
  </div>
@@ -124,7 +124,7 @@
124
124
  </div>
125
125
 
126
126
  <div id="footer">
127
- Generated on Sun Nov 24 14:07:04 2013 by
127
+ Generated on Sun Nov 24 14:38:52 2013 by
128
128
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
129
129
  0.8.7.3 (ruby-2.0.0).
130
130
  </div>
@@ -124,7 +124,7 @@
124
124
  </div>
125
125
 
126
126
  <div id="footer">
127
- Generated on Sun Nov 24 14:07:04 2013 by
127
+ Generated on Sun Nov 24 14:38:52 2013 by
128
128
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
129
129
  0.8.7.3 (ruby-2.0.0).
130
130
  </div>
@@ -124,7 +124,7 @@
124
124
  </div>
125
125
 
126
126
  <div id="footer">
127
- Generated on Sun Nov 24 14:07:04 2013 by
127
+ Generated on Sun Nov 24 14:38:52 2013 by
128
128
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
129
129
  0.8.7.3 (ruby-2.0.0).
130
130
  </div>
@@ -116,7 +116,7 @@
116
116
  </div>
117
117
 
118
118
  <div id="footer">
119
- Generated on Sun Nov 24 14:07:03 2013 by
119
+ Generated on Sun Nov 24 14:38:52 2013 by
120
120
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
121
121
  0.8.7.3 (ruby-2.0.0).
122
122
  </div>
@@ -409,7 +409,7 @@
409
409
  </div>
410
410
 
411
411
  <div id="footer">
412
- Generated on Sun Nov 24 14:07:03 2013 by
412
+ Generated on Sun Nov 24 14:38:52 2013 by
413
413
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
414
414
  0.8.7.3 (ruby-2.0.0).
415
415
  </div>
@@ -650,7 +650,7 @@ returned, else a <code>HashWithIndifferentAccess</code> with locales as keys.</p
650
650
  </div>
651
651
 
652
652
  <div id="footer">
653
- Generated on Sun Nov 24 14:07:04 2013 by
653
+ Generated on Sun Nov 24 14:38:53 2013 by
654
654
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
655
655
  0.8.7.3 (ruby-2.0.0).
656
656
  </div>
@@ -563,7 +563,7 @@ returned, else a <code>HashWithIndifferentAccess</code> with locales as keys.</p
563
563
  </div>
564
564
 
565
565
  <div id="footer">
566
- Generated on Sun Nov 24 14:07:04 2013 by
566
+ Generated on Sun Nov 24 14:38:53 2013 by
567
567
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
568
568
  0.8.7.3 (ruby-2.0.0).
569
569
  </div>
@@ -118,7 +118,7 @@
118
118
  </div>
119
119
 
120
120
  <div id="footer">
121
- Generated on Sun Nov 24 14:07:03 2013 by
121
+ Generated on Sun Nov 24 14:38:52 2013 by
122
122
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
123
123
  0.8.7.3 (ruby-2.0.0).
124
124
  </div>
@@ -1706,7 +1706,7 @@ The only supported value are:</p>
1706
1706
  </div>
1707
1707
 
1708
1708
  <div id="footer">
1709
- Generated on Sun Nov 24 14:07:03 2013 by
1709
+ Generated on Sun Nov 24 14:38:51 2013 by
1710
1710
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1711
1711
  0.8.7.3 (ruby-2.0.0).
1712
1712
  </div>
@@ -125,7 +125,7 @@
125
125
  </div>
126
126
 
127
127
  <div id="footer">
128
- Generated on Sun Nov 24 14:07:03 2013 by
128
+ Generated on Sun Nov 24 14:38:51 2013 by
129
129
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
130
130
  0.8.7.3 (ruby-2.0.0).
131
131
  </div>
@@ -271,7 +271,7 @@
271
271
  </div>
272
272
 
273
273
  <div id="footer">
274
- Generated on Sun Nov 24 14:07:04 2013 by
274
+ Generated on Sun Nov 24 14:38:53 2013 by
275
275
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
276
276
  0.8.7.3 (ruby-2.0.0).
277
277
  </div>
@@ -876,7 +876,7 @@
876
876
  </div>
877
877
 
878
878
  <div id="footer">
879
- Generated on Sun Nov 24 14:07:04 2013 by
879
+ Generated on Sun Nov 24 14:38:53 2013 by
880
880
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
881
881
  0.8.7.3 (ruby-2.0.0).
882
882
  </div>
@@ -118,7 +118,7 @@
118
118
  </div>
119
119
 
120
120
  <div id="footer">
121
- Generated on Sun Nov 24 14:07:03 2013 by
121
+ Generated on Sun Nov 24 14:38:52 2013 by
122
122
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
123
123
  0.8.7.3 (ruby-2.0.0).
124
124
  </div>
@@ -345,7 +345,7 @@
345
345
  </div>
346
346
 
347
347
  <div id="footer">
348
- Generated on Sun Nov 24 14:07:03 2013 by
348
+ Generated on Sun Nov 24 14:38:52 2013 by
349
349
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
350
350
  0.8.7.3 (ruby-2.0.0).
351
351
  </div>
@@ -125,7 +125,7 @@
125
125
  </div>
126
126
 
127
127
  <div id="footer">
128
- Generated on Sun Nov 24 14:07:03 2013 by
128
+ Generated on Sun Nov 24 14:38:52 2013 by
129
129
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
130
130
  0.8.7.3 (ruby-2.0.0).
131
131
  </div>
@@ -134,7 +134,7 @@
134
134
 
135
135
  </div>
136
136
  </dt>
137
- <dd><pre class="code"><span class='int'>3</span></pre></dd>
137
+ <dd><pre class="code"><span class='int'>4</span></pre></dd>
138
138
 
139
139
  <dt id="PATCH-constant" class="">PATCH =
140
140
  <div class="docstring">
@@ -180,7 +180,7 @@
180
180
  </div>
181
181
 
182
182
  <div id="footer">
183
- Generated on Sun Nov 24 14:07:03 2013 by
183
+ Generated on Sun Nov 24 14:38:52 2013 by
184
184
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
185
185
  0.8.7.3 (ruby-2.0.0).
186
186
  </div>
data/doc/Mbrao.html CHANGED
@@ -121,7 +121,7 @@ Licensed under the MIT license, which can be found at http://www.opensource.org/
121
121
  </div>
122
122
 
123
123
  <div id="footer">
124
- Generated on Sun Nov 24 14:07:03 2013 by
124
+ Generated on Sun Nov 24 14:38:51 2013 by
125
125
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
126
126
  0.8.7.3 (ruby-2.0.0).
127
127
  </div>
data/doc/_index.html CHANGED
@@ -386,7 +386,7 @@
386
386
  </div>
387
387
 
388
388
  <div id="footer">
389
- Generated on Sun Nov 24 14:07:03 2013 by
389
+ Generated on Sun Nov 24 14:38:51 2013 by
390
390
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
391
391
  0.8.7.3 (ruby-2.0.0).
392
392
  </div>
data/doc/file.README.html CHANGED
@@ -130,7 +130,7 @@ Mbrao::Parser.render(content)
130
130
  </div></div>
131
131
 
132
132
  <div id="footer">
133
- Generated on Sun Nov 24 14:07:03 2013 by
133
+ Generated on Sun Nov 24 14:38:51 2013 by
134
134
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
135
135
  0.8.7.3 (ruby-2.0.0).
136
136
  </div>
data/doc/index.html CHANGED
@@ -130,7 +130,7 @@ Mbrao::Parser.render(content)
130
130
  </div></div>
131
131
 
132
132
  <div id="footer">
133
- Generated on Sun Nov 24 14:07:03 2013 by
133
+ Generated on Sun Nov 24 14:38:51 2013 by
134
134
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
135
135
  0.8.7.3 (ruby-2.0.0).
136
136
  </div>
data/doc/method_list.html CHANGED
@@ -48,20 +48,20 @@
48
48
 
49
49
 
50
50
  <li class="r1 ">
51
- <span class='object_link'><a href="Mbrao/PublicInterface/ClassMethods.html#as_json-instance_method" title="Mbrao::PublicInterface::ClassMethods#as_json (method)">#as_json</a></span>
52
- <small>Mbrao::PublicInterface::ClassMethods</small>
51
+ <span class='object_link'><a href="Mbrao/Content.html#as_json-instance_method" title="Mbrao::Content#as_json (method)">#as_json</a></span>
52
+ <small>Mbrao::Content</small>
53
53
  </li>
54
54
 
55
55
 
56
56
  <li class="r2 ">
57
- <span class='object_link'><a href="Mbrao/Author.html#as_json-instance_method" title="Mbrao::Author#as_json (method)">#as_json</a></span>
58
- <small>Mbrao::Author</small>
57
+ <span class='object_link'><a href="Mbrao/PublicInterface/ClassMethods.html#as_json-instance_method" title="Mbrao::PublicInterface::ClassMethods#as_json (method)">#as_json</a></span>
58
+ <small>Mbrao::PublicInterface::ClassMethods</small>
59
59
  </li>
60
60
 
61
61
 
62
62
  <li class="r1 ">
63
- <span class='object_link'><a href="Mbrao/Content.html#as_json-instance_method" title="Mbrao::Content#as_json (method)">#as_json</a></span>
64
- <small>Mbrao::Content</small>
63
+ <span class='object_link'><a href="Mbrao/Author.html#as_json-instance_method" title="Mbrao::Author#as_json (method)">#as_json</a></span>
64
+ <small>Mbrao::Author</small>
65
65
  </li>
66
66
 
67
67
 
@@ -90,14 +90,14 @@
90
90
 
91
91
 
92
92
  <li class="r2 ">
93
- <span class='object_link'><a href="Mbrao/Author.html#create-class_method" title="Mbrao::Author.create (method)">create</a></span>
94
- <small>Mbrao::Author</small>
93
+ <span class='object_link'><a href="Mbrao/Content.html#create-class_method" title="Mbrao::Content.create (method)">create</a></span>
94
+ <small>Mbrao::Content</small>
95
95
  </li>
96
96
 
97
97
 
98
98
  <li class="r1 ">
99
- <span class='object_link'><a href="Mbrao/Content.html#create-class_method" title="Mbrao::Content.create (method)">create</a></span>
100
- <small>Mbrao::Content</small>
99
+ <span class='object_link'><a href="Mbrao/Author.html#create-class_method" title="Mbrao::Author.create (method)">create</a></span>
100
+ <small>Mbrao::Author</small>
101
101
  </li>
102
102
 
103
103
 
@@ -144,14 +144,14 @@
144
144
 
145
145
 
146
146
  <li class="r1 ">
147
- <span class='object_link'><a href="Mbrao/ParsingEngines/Base.html#filter_content-instance_method" title="Mbrao::ParsingEngines::Base#filter_content (method)">#filter_content</a></span>
148
- <small>Mbrao::ParsingEngines::Base</small>
147
+ <span class='object_link'><a href="Mbrao/ParsingEngines/PlainText.html#filter_content-instance_method" title="Mbrao::ParsingEngines::PlainText#filter_content (method)">#filter_content</a></span>
148
+ <small>Mbrao::ParsingEngines::PlainText</small>
149
149
  </li>
150
150
 
151
151
 
152
152
  <li class="r2 ">
153
- <span class='object_link'><a href="Mbrao/ParsingEngines/PlainText.html#filter_content-instance_method" title="Mbrao::ParsingEngines::PlainText#filter_content (method)">#filter_content</a></span>
154
- <small>Mbrao::ParsingEngines::PlainText</small>
153
+ <span class='object_link'><a href="Mbrao/ParsingEngines/Base.html#filter_content-instance_method" title="Mbrao::ParsingEngines::Base#filter_content (method)">#filter_content</a></span>
154
+ <small>Mbrao::ParsingEngines::Base</small>
155
155
  </li>
156
156
 
157
157
 
@@ -186,8 +186,8 @@
186
186
 
187
187
 
188
188
  <li class="r2 ">
189
- <span class='object_link'><a href="HTML/Pipeline/KramdownFilter.html#initialize-instance_method" title="HTML::Pipeline::KramdownFilter#initialize (method)">#initialize</a></span>
190
- <small>HTML::Pipeline::KramdownFilter</small>
189
+ <span class='object_link'><a href="Mbrao/Author.html#initialize-instance_method" title="Mbrao::Author#initialize (method)">#initialize</a></span>
190
+ <small>Mbrao::Author</small>
191
191
  </li>
192
192
 
193
193
 
@@ -198,20 +198,20 @@
198
198
 
199
199
 
200
200
  <li class="r2 ">
201
- <span class='object_link'><a href="Mbrao/Author.html#initialize-instance_method" title="Mbrao::Author#initialize (method)">#initialize</a></span>
202
- <small>Mbrao::Author</small>
201
+ <span class='object_link'><a href="HTML/Pipeline/KramdownFilter.html#initialize-instance_method" title="HTML::Pipeline::KramdownFilter#initialize (method)">#initialize</a></span>
202
+ <small>HTML::Pipeline::KramdownFilter</small>
203
203
  </li>
204
204
 
205
205
 
206
206
  <li class="r1 ">
207
- <span class='object_link'><a href="Mbrao/PublicInterface/ClassMethods.html#instance-instance_method" title="Mbrao::PublicInterface::ClassMethods#instance (method)">#instance</a></span>
208
- <small>Mbrao::PublicInterface::ClassMethods</small>
207
+ <span class='object_link'><a href="ActionView/Template/Handlers/MbraoTemplate.html#instance-class_method" title="ActionView::Template::Handlers::MbraoTemplate.instance (method)">instance</a></span>
208
+ <small>ActionView::Template::Handlers::MbraoTemplate</small>
209
209
  </li>
210
210
 
211
211
 
212
212
  <li class="r2 ">
213
- <span class='object_link'><a href="ActionView/Template/Handlers/MbraoTemplate.html#instance-class_method" title="ActionView::Template::Handlers::MbraoTemplate.instance (method)">instance</a></span>
214
- <small>ActionView::Template::Handlers::MbraoTemplate</small>
213
+ <span class='object_link'><a href="Mbrao/PublicInterface/ClassMethods.html#instance-instance_method" title="Mbrao::PublicInterface::ClassMethods#instance (method)">#instance</a></span>
214
+ <small>Mbrao::PublicInterface::ClassMethods</small>
215
215
  </li>
216
216
 
217
217
 
@@ -270,26 +270,26 @@
270
270
 
271
271
 
272
272
  <li class="r2 ">
273
- <span class='object_link'><a href="Mbrao/ParsingEngines/Base.html#parse-instance_method" title="Mbrao::ParsingEngines::Base#parse (method)">#parse</a></span>
274
- <small>Mbrao::ParsingEngines::Base</small>
273
+ <span class='object_link'><a href="Mbrao/Parser.html#parse-instance_method" title="Mbrao::Parser#parse (method)">#parse</a></span>
274
+ <small>Mbrao::Parser</small>
275
275
  </li>
276
276
 
277
277
 
278
278
  <li class="r1 ">
279
- <span class='object_link'><a href="Mbrao/Parser.html#parse-instance_method" title="Mbrao::Parser#parse (method)">#parse</a></span>
280
- <small>Mbrao::Parser</small>
279
+ <span class='object_link'><a href="Mbrao/ParsingEngines/Base.html#parse-instance_method" title="Mbrao::ParsingEngines::Base#parse (method)">#parse</a></span>
280
+ <small>Mbrao::ParsingEngines::Base</small>
281
281
  </li>
282
282
 
283
283
 
284
284
  <li class="r2 ">
285
- <span class='object_link'><a href="Mbrao/ParsingEngines/PlainText.html#parse_metadata-instance_method" title="Mbrao::ParsingEngines::PlainText#parse_metadata (method)">#parse_metadata</a></span>
286
- <small>Mbrao::ParsingEngines::PlainText</small>
285
+ <span class='object_link'><a href="Mbrao/ParsingEngines/Base.html#parse_metadata-instance_method" title="Mbrao::ParsingEngines::Base#parse_metadata (method)">#parse_metadata</a></span>
286
+ <small>Mbrao::ParsingEngines::Base</small>
287
287
  </li>
288
288
 
289
289
 
290
290
  <li class="r1 ">
291
- <span class='object_link'><a href="Mbrao/ParsingEngines/Base.html#parse_metadata-instance_method" title="Mbrao::ParsingEngines::Base#parse_metadata (method)">#parse_metadata</a></span>
292
- <small>Mbrao::ParsingEngines::Base</small>
291
+ <span class='object_link'><a href="Mbrao/ParsingEngines/PlainText.html#parse_metadata-instance_method" title="Mbrao::ParsingEngines::PlainText#parse_metadata (method)">#parse_metadata</a></span>
292
+ <small>Mbrao::ParsingEngines::PlainText</small>
293
293
  </li>
294
294
 
295
295
 
@@ -312,26 +312,26 @@
312
312
 
313
313
 
314
314
  <li class="r1 ">
315
- <span class='object_link'><a href="Mbrao/RenderingEngines/HtmlPipeline.html#render-instance_method" title="Mbrao::RenderingEngines::HtmlPipeline#render (method)">#render</a></span>
316
- <small>Mbrao::RenderingEngines::HtmlPipeline</small>
315
+ <span class='object_link'><a href="Mbrao/PublicInterface/ClassMethods.html#render-instance_method" title="Mbrao::PublicInterface::ClassMethods#render (method)">#render</a></span>
316
+ <small>Mbrao::PublicInterface::ClassMethods</small>
317
317
  </li>
318
318
 
319
319
 
320
320
  <li class="r2 ">
321
- <span class='object_link'><a href="Mbrao/RenderingEngines/Base.html#render-instance_method" title="Mbrao::RenderingEngines::Base#render (method)">#render</a></span>
322
- <small>Mbrao::RenderingEngines::Base</small>
321
+ <span class='object_link'><a href="ActionView/Template/Handlers/MbraoTemplate.html#render-instance_method" title="ActionView::Template::Handlers::MbraoTemplate#render (method)">#render</a></span>
322
+ <small>ActionView::Template::Handlers::MbraoTemplate</small>
323
323
  </li>
324
324
 
325
325
 
326
326
  <li class="r1 ">
327
- <span class='object_link'><a href="Mbrao/PublicInterface/ClassMethods.html#render-instance_method" title="Mbrao::PublicInterface::ClassMethods#render (method)">#render</a></span>
328
- <small>Mbrao::PublicInterface::ClassMethods</small>
327
+ <span class='object_link'><a href="Mbrao/RenderingEngines/Base.html#render-instance_method" title="Mbrao::RenderingEngines::Base#render (method)">#render</a></span>
328
+ <small>Mbrao::RenderingEngines::Base</small>
329
329
  </li>
330
330
 
331
331
 
332
332
  <li class="r2 ">
333
- <span class='object_link'><a href="ActionView/Template/Handlers/MbraoTemplate.html#render-instance_method" title="ActionView::Template::Handlers::MbraoTemplate#render (method)">#render</a></span>
334
- <small>ActionView::Template::Handlers::MbraoTemplate</small>
333
+ <span class='object_link'><a href="Mbrao/RenderingEngines/HtmlPipeline.html#render-instance_method" title="Mbrao::RenderingEngines::HtmlPipeline#render (method)">#render</a></span>
334
+ <small>Mbrao::RenderingEngines::HtmlPipeline</small>
335
335
  </li>
336
336
 
337
337
 
@@ -354,26 +354,26 @@
354
354
 
355
355
 
356
356
  <li class="r2 ">
357
- <span class='object_link'><a href="ActionView/Template/Handlers/MbraoTemplate.html#supports_streaming%3F-instance_method" title="ActionView::Template::Handlers::MbraoTemplate#supports_streaming? (method)">#supports_streaming?</a></span>
358
- <small>ActionView::Template::Handlers::MbraoTemplate</small>
357
+ <span class='object_link'><a href="Mbrao/Content.html#summary-instance_method" title="Mbrao::Content#summary (method)">#summary</a></span>
358
+ <small>Mbrao::Content</small>
359
359
  </li>
360
360
 
361
361
 
362
362
  <li class="r1 ">
363
- <span class='object_link'><a href="Mbrao/Content.html#tags-instance_method" title="Mbrao::Content#tags (method)">#tags</a></span>
364
- <small>Mbrao::Content</small>
363
+ <span class='object_link'><a href="ActionView/Template/Handlers/MbraoTemplate.html#supports_streaming%3F-instance_method" title="ActionView::Template::Handlers::MbraoTemplate#supports_streaming? (method)">#supports_streaming?</a></span>
364
+ <small>ActionView::Template::Handlers::MbraoTemplate</small>
365
365
  </li>
366
366
 
367
367
 
368
368
  <li class="r2 ">
369
- <span class='object_link'><a href="Mbrao/Content.html#title-instance_method" title="Mbrao::Content#title (method)">#title</a></span>
369
+ <span class='object_link'><a href="Mbrao/Content.html#tags-instance_method" title="Mbrao::Content#tags (method)">#tags</a></span>
370
370
  <small>Mbrao::Content</small>
371
371
  </li>
372
372
 
373
373
 
374
374
  <li class="r1 ">
375
- <span class='object_link'><a href="Mbrao/Author.html#uid-instance_method" title="Mbrao::Author#uid (method)">#uid</a></span>
376
- <small>Mbrao::Author</small>
375
+ <span class='object_link'><a href="Mbrao/Content.html#title-instance_method" title="Mbrao::Content#title (method)">#title</a></span>
376
+ <small>Mbrao::Content</small>
377
377
  </li>
378
378
 
379
379
 
@@ -384,18 +384,24 @@
384
384
 
385
385
 
386
386
  <li class="r1 ">
387
+ <span class='object_link'><a href="Mbrao/Author.html#uid-instance_method" title="Mbrao::Author#uid (method)">#uid</a></span>
388
+ <small>Mbrao::Author</small>
389
+ </li>
390
+
391
+
392
+ <li class="r2 ">
387
393
  <span class='object_link'><a href="Mbrao/Content.html#updated_at-instance_method" title="Mbrao::Content#updated_at (method)">#updated_at</a></span>
388
394
  <small>Mbrao::Content</small>
389
395
  </li>
390
396
 
391
397
 
392
- <li class="r2 ">
398
+ <li class="r1 ">
393
399
  <span class='object_link'><a href="Mbrao/Content.html#validate_locales-class_method" title="Mbrao::Content.validate_locales (method)">validate_locales</a></span>
394
400
  <small>Mbrao::Content</small>
395
401
  </li>
396
402
 
397
403
 
398
- <li class="r1 ">
404
+ <li class="r2 ">
399
405
  <span class='object_link'><a href="Mbrao/Author.html#website-instance_method" title="Mbrao::Author#website (method)">#website</a></span>
400
406
  <small>Mbrao::Author</small>
401
407
  </li>
@@ -103,7 +103,7 @@
103
103
  </div>
104
104
 
105
105
  <div id="footer">
106
- Generated on Sun Nov 24 14:07:03 2013 by
106
+ Generated on Sun Nov 24 14:38:51 2013 by
107
107
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
108
108
  0.8.7.3 (ruby-2.0.0).
109
109
  </div>
data/lib/mbrao/content.rb CHANGED
@@ -95,11 +95,13 @@ module Mbrao
95
95
  # @attribute locales
96
96
  # @return [Array] A list of locales for this content should be visible. An empty list means that there are no limitations.
97
97
  # @attribute title
98
- # @return [String|HashWithIndifferentAccess] The content's title. Can be a `String` or an `HashWithIndifferentAccess`, if multiple title are specified for
98
+ # @return [String|HashWithIndifferentAccess] The content's title. Can be a `String` or an `HashWithIndifferentAccess`, if multiple titles are specified for
99
99
  # multiple locales.
100
- # @attribute body
101
- # @return [String|HashWithIndifferentAccess] The content's body. Can be a `String` or an `HashWithIndifferentAccess`, if multiple contents are specified
100
+ # @attribute summary
101
+ # @return [String|HashWithIndifferentAccess] The content's summary. Can be a `String` or an `HashWithIndifferentAccess`, if multiple summaries are specified
102
102
  # for multiple locales.
103
+ # @attribute body
104
+ # @return [String] The content's body.
103
105
  # @attribute tags
104
106
  # @return [String|HashWithIndifferentAccess] The content's "more link" label. Can be a `String` or an `HashWithIndifferentAccess`, if multiple labels are
105
107
  # specified for multiple locales.
@@ -120,6 +122,7 @@ module Mbrao
120
122
  attr_accessor :uid
121
123
  attr_accessor :locales
122
124
  attr_accessor :title
125
+ attr_accessor :summary
123
126
  attr_accessor :body
124
127
  attr_accessor :tags
125
128
  attr_accessor :more
@@ -150,6 +153,14 @@ module Mbrao
150
153
  @title = is_hash?(new_title) ? new_title.ensure_hash(:indifferent, nil, :ensure_string) : new_title.ensure_string
151
154
  end
152
155
 
156
+ # Sets the `summary` attribute.
157
+ #
158
+ # @param new_summary [String|Hash] The new value for the attribute. If an Hash, keys must be a string with one or locale separated by commas.
159
+ # A empty or "*" will be the default value.
160
+ def summary=(new_summary)
161
+ @summary = is_hash?(new_summary) ? new_summary.ensure_hash(:indifferent, nil, :ensure_string) : new_summary.ensure_string
162
+ end
163
+
153
164
  # Sets the `body` attribute.
154
165
  #
155
166
  # @param value [String] The new value for the attribute. Can contain locales restriction (like !en), which will must be interpreted using #get_body.
@@ -210,7 +221,7 @@ module Mbrao
210
221
  #
211
222
  # @return The metadata attribute.
212
223
  def metadata
213
- @metadata || {}
224
+ @metadata ||= HashWithIndifferentAccess.new
214
225
  end
215
226
 
216
227
  # Sets the `metadata` attribute.
@@ -233,7 +244,7 @@ module Mbrao
233
244
  # * `:exclude_empty`, if to exclude nil values. Default is `false`.
234
245
  # @return [Hash] An hash with all attributes.
235
246
  def as_json(options = {})
236
- keys = [:uid, :locales, :title, :body, :tags, :more, :author, :created_at, :updated_at, :metadata]
247
+ keys = [:uid, :locales, :title, :summary, :body, :tags, :more, :author, :created_at, :updated_at, :metadata]
237
248
  ::Mbrao::Parser.as_json(self, keys, options)
238
249
  end
239
250
 
@@ -258,7 +269,7 @@ module Mbrao
258
269
  def self.create(metadata, body)
259
270
  rv = Mbrao::Content.new
260
271
  rv.body = body.ensure_string.strip
261
- assign_metadata(rv, metadata) if metadata.is_a?(Hash)
272
+ assign_metadata(rv, metadata.symbolize_keys) if metadata.is_a?(Hash)
262
273
  rv
263
274
  end
264
275
 
@@ -269,10 +280,9 @@ module Mbrao
269
280
  # @param metadata [Hash] The metadata to assign.
270
281
  # @return [Content] The content with metadata.
271
282
  def self.assign_metadata(content, metadata)
272
- metadata = metadata.symbolize_keys!
273
-
274
283
  content.uid = metadata.delete(:uid)
275
284
  content.title = metadata.delete(:title)
285
+ content.summary = metadata.delete(:summary)
276
286
  content.author = Mbrao::Author.create(metadata.delete(:author))
277
287
  content.tags = metadata.delete(:tags)
278
288
  content.more = metadata.delete(:more)
data/lib/mbrao/version.rb CHANGED
@@ -14,7 +14,7 @@ module Mbrao
14
14
  MAJOR = 1
15
15
 
16
16
  # The minor version.
17
- MINOR = 3
17
+ MINOR = 4
18
18
 
19
19
  # The patch version.
20
20
  PATCH = 0