mbrao 1.1.1 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis-gemfile +5 -2
- data/.travis.yml +2 -2
- data/Gemfile +6 -4
- data/README.md +1 -0
- data/Rakefile +18 -0
- data/doc/ActionView/Template/Handlers/MbraoTemplate.html +5 -5
- data/doc/ActionView/Template/Handlers.html +5 -5
- data/doc/HTML/Pipeline/KramdownFilter.html +5 -5
- data/doc/HTML/Pipeline.html +5 -5
- data/doc/HTML.html +5 -5
- data/doc/Mbrao/Author.html +12 -12
- data/doc/Mbrao/Content.html +104 -140
- data/doc/Mbrao/ContentPublicInterface.html +6 -6
- data/doc/Mbrao/Exceptions/InvalidDate.html +7 -7
- data/doc/Mbrao/Exceptions/InvalidMetadata.html +7 -7
- data/doc/Mbrao/Exceptions/Parsing.html +7 -7
- data/doc/Mbrao/Exceptions/Rendering.html +7 -7
- data/doc/Mbrao/Exceptions/UnavailableLocalization.html +7 -7
- data/doc/Mbrao/Exceptions/Unimplemented.html +7 -7
- data/doc/Mbrao/Exceptions/UnknownEngine.html +7 -7
- data/doc/Mbrao/Exceptions.html +5 -5
- data/doc/Mbrao/Parser.html +15 -15
- data/doc/Mbrao/ParsingEngines/Base.html +5 -5
- data/doc/Mbrao/ParsingEngines/PlainText.html +5 -5
- data/doc/Mbrao/ParsingEngines.html +5 -5
- data/doc/Mbrao/PublicInterface/ClassMethods.html +20 -32
- data/doc/Mbrao/PublicInterface.html +5 -5
- data/doc/Mbrao/RenderingEngines/Base.html +5 -5
- data/doc/Mbrao/RenderingEngines/HtmlPipeline.html +16 -16
- data/doc/Mbrao/RenderingEngines.html +5 -5
- data/doc/Mbrao/Validations/ClassMethods.html +13 -351
- data/doc/Mbrao/Validations.html +5 -5
- data/doc/Mbrao/Version.html +7 -7
- data/doc/Mbrao.html +5 -5
- data/doc/_index.html +6 -6
- data/doc/class_list.html +3 -2
- data/doc/file.README.html +7 -6
- data/doc/file_list.html +2 -1
- data/doc/frames.html +1 -1
- data/doc/index.html +7 -6
- data/doc/js/full_list.js +7 -2
- data/doc/method_list.html +67 -192
- data/doc/top-level-namespace.html +5 -5
- data/lib/mbrao/author.rb +1 -1
- data/lib/mbrao/content.rb +10 -12
- data/lib/mbrao/exceptions.rb +7 -7
- data/lib/mbrao/parser.rb +4 -65
- data/lib/mbrao/rendering_engines/html_pipeline.rb +5 -5
- data/lib/mbrao/version.rb +2 -2
- data/lib/mbrao.rb +1 -1
- data/mbrao.gemspec +4 -4
- data/spec/coverage_helper.rb +4 -1
- data/spec/mbrao/author_spec.rb +5 -5
- data/spec/mbrao/content_spec.rb +3 -3
- data/spec/mbrao/integrations/rails_spec.rb +8 -8
- data/spec/mbrao/parser_spec.rb +19 -96
- data/spec/mbrao/parsing_engines/base_spec.rb +7 -7
- data/spec/mbrao/rendering_engines/html_pipeline_spec.rb +13 -14
- metadata +11 -11
data/doc/method_list.html
CHANGED
@@ -15,6 +15,7 @@
|
|
15
15
|
<script type="text/javascript" charset="utf-8" src="js/full_list.js"></script>
|
16
16
|
|
17
17
|
|
18
|
+
<title>Method List</title>
|
18
19
|
<base id="base_target" target="_parent" />
|
19
20
|
</head>
|
20
21
|
<body>
|
@@ -48,457 +49,331 @@
|
|
48
49
|
|
49
50
|
<li class="r1 ">
|
50
51
|
<span class='object_link'><a href="Mbrao/Content.html#author-instance_method" title="Mbrao::Content#author (method)">#author</a></span>
|
51
|
-
|
52
|
-
<small>Mbrao::Content</small>
|
53
|
-
|
52
|
+
<small>Mbrao::Content</small>
|
54
53
|
</li>
|
55
54
|
|
56
55
|
|
57
56
|
<li class="r2 ">
|
58
57
|
<span class='object_link'><a href="Mbrao/Content.html#body-instance_method" title="Mbrao::Content#body (method)">#body</a></span>
|
59
|
-
|
60
|
-
<small>Mbrao::Content</small>
|
61
|
-
|
58
|
+
<small>Mbrao::Content</small>
|
62
59
|
</li>
|
63
60
|
|
64
61
|
|
65
62
|
<li class="r1 ">
|
66
63
|
<span class='object_link'><a href="ActionView/Template/Handlers/MbraoTemplate.html#call-instance_method" title="ActionView::Template::Handlers::MbraoTemplate#call (method)">#call</a></span>
|
67
|
-
|
68
|
-
<small>ActionView::Template::Handlers::MbraoTemplate</small>
|
69
|
-
|
64
|
+
<small>ActionView::Template::Handlers::MbraoTemplate</small>
|
70
65
|
</li>
|
71
66
|
|
72
67
|
|
73
68
|
<li class="r2 ">
|
74
69
|
<span class='object_link'><a href="HTML/Pipeline/KramdownFilter.html#call-instance_method" title="HTML::Pipeline::KramdownFilter#call (method)">#call</a></span>
|
75
|
-
|
76
|
-
<small>HTML::Pipeline::KramdownFilter</small>
|
77
|
-
|
70
|
+
<small>HTML::Pipeline::KramdownFilter</small>
|
78
71
|
</li>
|
79
72
|
|
80
73
|
|
81
74
|
<li class="r1 ">
|
82
75
|
<span class='object_link'><a href="Mbrao/Content.html#create-class_method" title="Mbrao::Content.create (method)">create</a></span>
|
83
|
-
|
84
|
-
<small>Mbrao::Content</small>
|
85
|
-
|
76
|
+
<small>Mbrao::Content</small>
|
86
77
|
</li>
|
87
78
|
|
88
79
|
|
89
80
|
<li class="r2 ">
|
90
81
|
<span class='object_link'><a href="Mbrao/Author.html#create-class_method" title="Mbrao::Author.create (method)">create</a></span>
|
91
|
-
|
92
|
-
<small>Mbrao::Author</small>
|
93
|
-
|
82
|
+
<small>Mbrao::Author</small>
|
94
83
|
</li>
|
95
84
|
|
96
85
|
|
97
86
|
<li class="r1 ">
|
98
87
|
<span class='object_link'><a href="Mbrao/PublicInterface/ClassMethods.html#create_engine-instance_method" title="Mbrao::PublicInterface::ClassMethods#create_engine (method)">#create_engine</a></span>
|
99
|
-
|
100
|
-
<small>Mbrao::PublicInterface::ClassMethods</small>
|
101
|
-
|
88
|
+
<small>Mbrao::PublicInterface::ClassMethods</small>
|
102
89
|
</li>
|
103
90
|
|
104
91
|
|
105
92
|
<li class="r2 ">
|
106
93
|
<span class='object_link'><a href="Mbrao/Content.html#created_at-instance_method" title="Mbrao::Content#created_at (method)">#created_at</a></span>
|
107
|
-
|
108
|
-
<small>Mbrao::Content</small>
|
109
|
-
|
94
|
+
<small>Mbrao::Content</small>
|
110
95
|
</li>
|
111
96
|
|
112
97
|
|
113
98
|
<li class="r1 ">
|
114
99
|
<span class='object_link'><a href="Mbrao/PublicInterface/ClassMethods.html#default_locale-instance_method" title="Mbrao::PublicInterface::ClassMethods#default_locale (method)">#default_locale</a></span>
|
115
|
-
|
116
|
-
<small>Mbrao::PublicInterface::ClassMethods</small>
|
117
|
-
|
100
|
+
<small>Mbrao::PublicInterface::ClassMethods</small>
|
118
101
|
</li>
|
119
102
|
|
120
103
|
|
121
104
|
<li class="r2 ">
|
122
105
|
<span class='object_link'><a href="Mbrao/RenderingEngines/HtmlPipeline.html#default_options-instance_method" title="Mbrao::RenderingEngines::HtmlPipeline#default_options (method)">#default_options</a></span>
|
123
|
-
|
124
|
-
<small>Mbrao::RenderingEngines::HtmlPipeline</small>
|
125
|
-
|
106
|
+
<small>Mbrao::RenderingEngines::HtmlPipeline</small>
|
126
107
|
</li>
|
127
108
|
|
128
109
|
|
129
110
|
<li class="r1 ">
|
130
111
|
<span class='object_link'><a href="Mbrao/RenderingEngines/HtmlPipeline.html#default_pipeline-instance_method" title="Mbrao::RenderingEngines::HtmlPipeline#default_pipeline (method)">#default_pipeline</a></span>
|
131
|
-
|
132
|
-
<small>Mbrao::RenderingEngines::HtmlPipeline</small>
|
133
|
-
|
112
|
+
<small>Mbrao::RenderingEngines::HtmlPipeline</small>
|
134
113
|
</li>
|
135
114
|
|
136
115
|
|
137
116
|
<li class="r2 ">
|
138
117
|
<span class='object_link'><a href="Mbrao/Author.html#email-instance_method" title="Mbrao::Author#email (method)">#email</a></span>
|
139
|
-
|
140
|
-
<small>Mbrao::Author</small>
|
141
|
-
|
118
|
+
<small>Mbrao::Author</small>
|
142
119
|
</li>
|
143
120
|
|
144
121
|
|
145
122
|
<li class="r1 ">
|
146
123
|
<span class='object_link'><a href="Mbrao/ContentPublicInterface.html#enabled_for_locales%3F-instance_method" title="Mbrao::ContentPublicInterface#enabled_for_locales? (method)">#enabled_for_locales?</a></span>
|
147
|
-
|
148
|
-
<small>Mbrao::ContentPublicInterface</small>
|
149
|
-
|
124
|
+
<small>Mbrao::ContentPublicInterface</small>
|
150
125
|
</li>
|
151
126
|
|
152
127
|
|
153
128
|
<li class="r2 ">
|
154
|
-
<span class='object_link'><a href="Mbrao/ParsingEngines/
|
155
|
-
|
156
|
-
<small>Mbrao::ParsingEngines::Base</small>
|
157
|
-
|
129
|
+
<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>
|
130
|
+
<small>Mbrao::ParsingEngines::PlainText</small>
|
158
131
|
</li>
|
159
132
|
|
160
133
|
|
161
134
|
<li class="r1 ">
|
162
|
-
<span class='object_link'><a href="Mbrao/ParsingEngines/
|
163
|
-
|
164
|
-
<small>Mbrao::ParsingEngines::PlainText</small>
|
165
|
-
|
135
|
+
<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>
|
136
|
+
<small>Mbrao::ParsingEngines::Base</small>
|
166
137
|
</li>
|
167
138
|
|
168
139
|
|
169
140
|
<li class="r2 ">
|
170
141
|
<span class='object_link'><a href="Mbrao/ContentPublicInterface.html#get_body-instance_method" title="Mbrao::ContentPublicInterface#get_body (method)">#get_body</a></span>
|
171
|
-
|
172
|
-
<small>Mbrao::ContentPublicInterface</small>
|
173
|
-
|
142
|
+
<small>Mbrao::ContentPublicInterface</small>
|
174
143
|
</li>
|
175
144
|
|
176
145
|
|
177
146
|
<li class="r1 ">
|
178
147
|
<span class='object_link'><a href="Mbrao/ContentPublicInterface.html#get_more-instance_method" title="Mbrao::ContentPublicInterface#get_more (method)">#get_more</a></span>
|
179
|
-
|
180
|
-
<small>Mbrao::ContentPublicInterface</small>
|
181
|
-
|
148
|
+
<small>Mbrao::ContentPublicInterface</small>
|
182
149
|
</li>
|
183
150
|
|
184
151
|
|
185
152
|
<li class="r2 ">
|
186
153
|
<span class='object_link'><a href="Mbrao/ContentPublicInterface.html#get_tags-instance_method" title="Mbrao::ContentPublicInterface#get_tags (method)">#get_tags</a></span>
|
187
|
-
|
188
|
-
<small>Mbrao::ContentPublicInterface</small>
|
189
|
-
|
154
|
+
<small>Mbrao::ContentPublicInterface</small>
|
190
155
|
</li>
|
191
156
|
|
192
157
|
|
193
158
|
<li class="r1 ">
|
194
159
|
<span class='object_link'><a href="Mbrao/ContentPublicInterface.html#get_title-instance_method" title="Mbrao::ContentPublicInterface#get_title (method)">#get_title</a></span>
|
195
|
-
|
196
|
-
<small>Mbrao::ContentPublicInterface</small>
|
197
|
-
|
160
|
+
<small>Mbrao::ContentPublicInterface</small>
|
198
161
|
</li>
|
199
162
|
|
200
163
|
|
201
164
|
<li class="r2 ">
|
202
165
|
<span class='object_link'><a href="Mbrao/Author.html#image-instance_method" title="Mbrao::Author#image (method)">#image</a></span>
|
203
|
-
|
204
|
-
<small>Mbrao::Author</small>
|
205
|
-
|
166
|
+
<small>Mbrao::Author</small>
|
206
167
|
</li>
|
207
168
|
|
208
169
|
|
209
170
|
<li class="r1 ">
|
210
|
-
<span class='object_link'><a href="
|
211
|
-
|
212
|
-
<small>Mbrao::Author</small>
|
213
|
-
|
171
|
+
<span class='object_link'><a href="HTML/Pipeline/KramdownFilter.html#initialize-instance_method" title="HTML::Pipeline::KramdownFilter#initialize (method)">#initialize</a></span>
|
172
|
+
<small>HTML::Pipeline::KramdownFilter</small>
|
214
173
|
</li>
|
215
174
|
|
216
175
|
|
217
176
|
<li class="r2 ">
|
218
|
-
<span class='object_link'><a href="
|
219
|
-
|
220
|
-
<small>HTML::Pipeline::KramdownFilter</small>
|
221
|
-
|
177
|
+
<span class='object_link'><a href="Mbrao/Author.html#initialize-instance_method" title="Mbrao::Author#initialize (method)">#initialize</a></span>
|
178
|
+
<small>Mbrao::Author</small>
|
222
179
|
</li>
|
223
180
|
|
224
181
|
|
225
182
|
<li class="r1 ">
|
226
183
|
<span class='object_link'><a href="Mbrao/Content.html#initialize-instance_method" title="Mbrao::Content#initialize (method)">#initialize</a></span>
|
227
|
-
|
228
|
-
<small>Mbrao::Content</small>
|
229
|
-
|
184
|
+
<small>Mbrao::Content</small>
|
230
185
|
</li>
|
231
186
|
|
232
187
|
|
233
188
|
<li class="r2 ">
|
234
189
|
<span class='object_link'><a href="Mbrao/PublicInterface/ClassMethods.html#instance-instance_method" title="Mbrao::PublicInterface::ClassMethods#instance (method)">#instance</a></span>
|
235
|
-
|
236
|
-
<small>Mbrao::PublicInterface::ClassMethods</small>
|
237
|
-
|
190
|
+
<small>Mbrao::PublicInterface::ClassMethods</small>
|
238
191
|
</li>
|
239
192
|
|
240
193
|
|
241
194
|
<li class="r1 ">
|
242
195
|
<span class='object_link'><a href="ActionView/Template/Handlers/MbraoTemplate.html#instance-class_method" title="ActionView::Template::Handlers::MbraoTemplate.instance (method)">instance</a></span>
|
243
|
-
|
244
|
-
<small>ActionView::Template::Handlers::MbraoTemplate</small>
|
245
|
-
|
196
|
+
<small>ActionView::Template::Handlers::MbraoTemplate</small>
|
246
197
|
</li>
|
247
198
|
|
248
199
|
|
249
200
|
<li class="r2 ">
|
250
201
|
<span class='object_link'><a href="Mbrao/Validations/ClassMethods.html#is_email%3F-instance_method" title="Mbrao::Validations::ClassMethods#is_email? (method)">#is_email?</a></span>
|
251
|
-
|
252
|
-
<small>Mbrao::Validations::ClassMethods</small>
|
253
|
-
|
202
|
+
<small>Mbrao::Validations::ClassMethods</small>
|
254
203
|
</li>
|
255
204
|
|
256
205
|
|
257
206
|
<li class="r1 ">
|
258
207
|
<span class='object_link'><a href="Mbrao/Validations/ClassMethods.html#is_url%3F-instance_method" title="Mbrao::Validations::ClassMethods#is_url? (method)">#is_url?</a></span>
|
259
|
-
|
260
|
-
<small>Mbrao::Validations::ClassMethods</small>
|
261
|
-
|
208
|
+
<small>Mbrao::Validations::ClassMethods</small>
|
262
209
|
</li>
|
263
210
|
|
264
211
|
|
265
212
|
<li class="r2 ">
|
266
213
|
<span class='object_link'><a href="Mbrao/PublicInterface/ClassMethods.html#locale-instance_method" title="Mbrao::PublicInterface::ClassMethods#locale (method)">#locale</a></span>
|
267
|
-
|
268
|
-
<small>Mbrao::PublicInterface::ClassMethods</small>
|
269
|
-
|
214
|
+
<small>Mbrao::PublicInterface::ClassMethods</small>
|
270
215
|
</li>
|
271
216
|
|
272
217
|
|
273
218
|
<li class="r1 ">
|
274
219
|
<span class='object_link'><a href="Mbrao/Content.html#locales-instance_method" title="Mbrao::Content#locales (method)">#locales</a></span>
|
275
|
-
|
276
|
-
<small>Mbrao::Content</small>
|
277
|
-
|
220
|
+
<small>Mbrao::Content</small>
|
278
221
|
</li>
|
279
222
|
|
280
223
|
|
281
224
|
<li class="r2 ">
|
282
225
|
<span class='object_link'><a href="Mbrao/Author.html#metadata-instance_method" title="Mbrao::Author#metadata (method)">#metadata</a></span>
|
283
|
-
|
284
|
-
<small>Mbrao::Author</small>
|
285
|
-
|
226
|
+
<small>Mbrao::Author</small>
|
286
227
|
</li>
|
287
228
|
|
288
229
|
|
289
230
|
<li class="r1 ">
|
290
231
|
<span class='object_link'><a href="Mbrao/Content.html#metadata-instance_method" title="Mbrao::Content#metadata (method)">#metadata</a></span>
|
291
|
-
|
292
|
-
<small>Mbrao::Content</small>
|
293
|
-
|
232
|
+
<small>Mbrao::Content</small>
|
294
233
|
</li>
|
295
234
|
|
296
235
|
|
297
236
|
<li class="r2 ">
|
298
237
|
<span class='object_link'><a href="Mbrao/Content.html#more-instance_method" title="Mbrao::Content#more (method)">#more</a></span>
|
299
|
-
|
300
|
-
<small>Mbrao::Content</small>
|
301
|
-
|
238
|
+
<small>Mbrao::Content</small>
|
302
239
|
</li>
|
303
240
|
|
304
241
|
|
305
242
|
<li class="r1 ">
|
306
243
|
<span class='object_link'><a href="Mbrao/Author.html#name-instance_method" title="Mbrao::Author#name (method)">#name</a></span>
|
307
|
-
|
308
|
-
<small>Mbrao::Author</small>
|
309
|
-
|
244
|
+
<small>Mbrao::Author</small>
|
310
245
|
</li>
|
311
246
|
|
312
247
|
|
313
248
|
<li class="r2 ">
|
314
249
|
<span class='object_link'><a href="Mbrao/PublicInterface/ClassMethods.html#parse-instance_method" title="Mbrao::PublicInterface::ClassMethods#parse (method)">#parse</a></span>
|
315
|
-
|
316
|
-
<small>Mbrao::PublicInterface::ClassMethods</small>
|
317
|
-
|
250
|
+
<small>Mbrao::PublicInterface::ClassMethods</small>
|
318
251
|
</li>
|
319
252
|
|
320
253
|
|
321
254
|
<li class="r1 ">
|
322
|
-
<span class='object_link'><a href="Mbrao/
|
323
|
-
|
324
|
-
<small>Mbrao::Parser</small>
|
325
|
-
|
255
|
+
<span class='object_link'><a href="Mbrao/ParsingEngines/Base.html#parse-instance_method" title="Mbrao::ParsingEngines::Base#parse (method)">#parse</a></span>
|
256
|
+
<small>Mbrao::ParsingEngines::Base</small>
|
326
257
|
</li>
|
327
258
|
|
328
259
|
|
329
260
|
<li class="r2 ">
|
330
|
-
<span class='object_link'><a href="Mbrao/
|
331
|
-
|
332
|
-
<small>Mbrao::ParsingEngines::Base</small>
|
333
|
-
|
261
|
+
<span class='object_link'><a href="Mbrao/Parser.html#parse-instance_method" title="Mbrao::Parser#parse (method)">#parse</a></span>
|
262
|
+
<small>Mbrao::Parser</small>
|
334
263
|
</li>
|
335
264
|
|
336
265
|
|
337
266
|
<li class="r1 ">
|
338
267
|
<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>
|
339
|
-
|
340
|
-
<small>Mbrao::ParsingEngines::PlainText</small>
|
341
|
-
|
268
|
+
<small>Mbrao::ParsingEngines::PlainText</small>
|
342
269
|
</li>
|
343
270
|
|
344
271
|
|
345
272
|
<li class="r2 ">
|
346
273
|
<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>
|
347
|
-
|
348
|
-
<small>Mbrao::ParsingEngines::Base</small>
|
349
|
-
|
274
|
+
<small>Mbrao::ParsingEngines::Base</small>
|
350
275
|
</li>
|
351
276
|
|
352
277
|
|
353
278
|
<li class="r1 ">
|
354
279
|
<span class='object_link'><a href="Mbrao/PublicInterface/ClassMethods.html#parsing_engine-instance_method" title="Mbrao::PublicInterface::ClassMethods#parsing_engine (method)">#parsing_engine</a></span>
|
355
|
-
|
356
|
-
<small>Mbrao::PublicInterface::ClassMethods</small>
|
357
|
-
|
280
|
+
<small>Mbrao::PublicInterface::ClassMethods</small>
|
358
281
|
</li>
|
359
282
|
|
360
283
|
|
361
284
|
<li class="r2 ">
|
362
|
-
<span class='object_link'><a href="Mbrao/
|
363
|
-
|
364
|
-
<small>Mbrao::Parser</small>
|
365
|
-
|
285
|
+
<span class='object_link'><a href="Mbrao/RenderingEngines/HtmlPipeline.html#render-instance_method" title="Mbrao::RenderingEngines::HtmlPipeline#render (method)">#render</a></span>
|
286
|
+
<small>Mbrao::RenderingEngines::HtmlPipeline</small>
|
366
287
|
</li>
|
367
288
|
|
368
289
|
|
369
290
|
<li class="r1 ">
|
370
|
-
<span class='object_link'><a href="Mbrao/
|
371
|
-
|
372
|
-
<small>Mbrao::RenderingEngines::Base</small>
|
373
|
-
|
291
|
+
<span class='object_link'><a href="Mbrao/Parser.html#render-instance_method" title="Mbrao::Parser#render (method)">#render</a></span>
|
292
|
+
<small>Mbrao::Parser</small>
|
374
293
|
</li>
|
375
294
|
|
376
295
|
|
377
296
|
<li class="r2 ">
|
378
|
-
<span class='object_link'><a href="
|
379
|
-
|
380
|
-
<small>Mbrao::RenderingEngines::HtmlPipeline</small>
|
381
|
-
|
297
|
+
<span class='object_link'><a href="ActionView/Template/Handlers/MbraoTemplate.html#render-instance_method" title="ActionView::Template::Handlers::MbraoTemplate#render (method)">#render</a></span>
|
298
|
+
<small>ActionView::Template::Handlers::MbraoTemplate</small>
|
382
299
|
</li>
|
383
300
|
|
384
301
|
|
385
302
|
<li class="r1 ">
|
386
|
-
<span class='object_link'><a href="
|
387
|
-
|
388
|
-
<small>ActionView::Template::Handlers::MbraoTemplate</small>
|
389
|
-
|
303
|
+
<span class='object_link'><a href="Mbrao/RenderingEngines/Base.html#render-instance_method" title="Mbrao::RenderingEngines::Base#render (method)">#render</a></span>
|
304
|
+
<small>Mbrao::RenderingEngines::Base</small>
|
390
305
|
</li>
|
391
306
|
|
392
307
|
|
393
308
|
<li class="r2 ">
|
394
309
|
<span class='object_link'><a href="Mbrao/PublicInterface/ClassMethods.html#render-instance_method" title="Mbrao::PublicInterface::ClassMethods#render (method)">#render</a></span>
|
395
|
-
|
396
|
-
<small>Mbrao::PublicInterface::ClassMethods</small>
|
397
|
-
|
310
|
+
<small>Mbrao::PublicInterface::ClassMethods</small>
|
398
311
|
</li>
|
399
312
|
|
400
313
|
|
401
314
|
<li class="r1 ">
|
402
315
|
<span class='object_link'><a href="Mbrao/PublicInterface/ClassMethods.html#rendering_engine-instance_method" title="Mbrao::PublicInterface::ClassMethods#rendering_engine (method)">#rendering_engine</a></span>
|
403
|
-
|
404
|
-
<small>Mbrao::PublicInterface::ClassMethods</small>
|
405
|
-
|
316
|
+
<small>Mbrao::PublicInterface::ClassMethods</small>
|
406
317
|
</li>
|
407
318
|
|
408
319
|
|
409
320
|
<li class="r2 ">
|
410
|
-
<span class='object_link'><a href="Mbrao/
|
411
|
-
|
412
|
-
<small>Mbrao::Validations::ClassMethods</small>
|
413
|
-
|
321
|
+
<span class='object_link'><a href="Mbrao/ParsingEngines/PlainText.html#separate_components-instance_method" title="Mbrao::ParsingEngines::PlainText#separate_components (method)">#separate_components</a></span>
|
322
|
+
<small>Mbrao::ParsingEngines::PlainText</small>
|
414
323
|
</li>
|
415
324
|
|
416
325
|
|
417
326
|
<li class="r1 ">
|
418
|
-
<span class='object_link'><a href="Mbrao/Validations/ClassMethods.html#sanitized_hash-instance_method" title="Mbrao::Validations::ClassMethods#sanitized_hash (method)">#sanitized_hash</a></span>
|
419
|
-
|
420
|
-
<small>Mbrao::Validations::ClassMethods</small>
|
421
|
-
|
422
|
-
</li>
|
423
|
-
|
424
|
-
|
425
|
-
<li class="r2 ">
|
426
327
|
<span class='object_link'><a href="Mbrao/ParsingEngines/Base.html#separate_components-instance_method" title="Mbrao::ParsingEngines::Base#separate_components (method)">#separate_components</a></span>
|
427
|
-
|
428
|
-
<small>Mbrao::ParsingEngines::Base</small>
|
429
|
-
|
430
|
-
</li>
|
431
|
-
|
432
|
-
|
433
|
-
<li class="r1 ">
|
434
|
-
<span class='object_link'><a href="Mbrao/ParsingEngines/PlainText.html#separate_components-instance_method" title="Mbrao::ParsingEngines::PlainText#separate_components (method)">#separate_components</a></span>
|
435
|
-
|
436
|
-
<small>Mbrao::ParsingEngines::PlainText</small>
|
437
|
-
|
328
|
+
<small>Mbrao::ParsingEngines::Base</small>
|
438
329
|
</li>
|
439
330
|
|
440
331
|
|
441
332
|
<li class="r2 ">
|
442
333
|
<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>
|
443
|
-
|
444
|
-
<small>ActionView::Template::Handlers::MbraoTemplate</small>
|
445
|
-
|
334
|
+
<small>ActionView::Template::Handlers::MbraoTemplate</small>
|
446
335
|
</li>
|
447
336
|
|
448
337
|
|
449
338
|
<li class="r1 ">
|
450
339
|
<span class='object_link'><a href="Mbrao/Content.html#tags-instance_method" title="Mbrao::Content#tags (method)">#tags</a></span>
|
451
|
-
|
452
|
-
<small>Mbrao::Content</small>
|
453
|
-
|
340
|
+
<small>Mbrao::Content</small>
|
454
341
|
</li>
|
455
342
|
|
456
343
|
|
457
344
|
<li class="r2 ">
|
458
345
|
<span class='object_link'><a href="Mbrao/Content.html#title-instance_method" title="Mbrao::Content#title (method)">#title</a></span>
|
459
|
-
|
460
|
-
<small>Mbrao::Content</small>
|
461
|
-
|
346
|
+
<small>Mbrao::Content</small>
|
462
347
|
</li>
|
463
348
|
|
464
349
|
|
465
350
|
<li class="r1 ">
|
466
351
|
<span class='object_link'><a href="Mbrao/Author.html#uid-instance_method" title="Mbrao::Author#uid (method)">#uid</a></span>
|
467
|
-
|
468
|
-
<small>Mbrao::Author</small>
|
469
|
-
|
352
|
+
<small>Mbrao::Author</small>
|
470
353
|
</li>
|
471
354
|
|
472
355
|
|
473
356
|
<li class="r2 ">
|
474
357
|
<span class='object_link'><a href="Mbrao/Content.html#uid-instance_method" title="Mbrao::Content#uid (method)">#uid</a></span>
|
475
|
-
|
476
|
-
<small>Mbrao::Content</small>
|
477
|
-
|
358
|
+
<small>Mbrao::Content</small>
|
478
359
|
</li>
|
479
360
|
|
480
361
|
|
481
362
|
<li class="r1 ">
|
482
363
|
<span class='object_link'><a href="Mbrao/Content.html#updated_at-instance_method" title="Mbrao::Content#updated_at (method)">#updated_at</a></span>
|
483
|
-
|
484
|
-
<small>Mbrao::Content</small>
|
485
|
-
|
364
|
+
<small>Mbrao::Content</small>
|
486
365
|
</li>
|
487
366
|
|
488
367
|
|
489
368
|
<li class="r2 ">
|
490
369
|
<span class='object_link'><a href="Mbrao/Content.html#validate_locales-class_method" title="Mbrao::Content.validate_locales (method)">validate_locales</a></span>
|
491
|
-
|
492
|
-
<small>Mbrao::Content</small>
|
493
|
-
|
370
|
+
<small>Mbrao::Content</small>
|
494
371
|
</li>
|
495
372
|
|
496
373
|
|
497
374
|
<li class="r1 ">
|
498
375
|
<span class='object_link'><a href="Mbrao/Author.html#website-instance_method" title="Mbrao::Author#website (method)">#website</a></span>
|
499
|
-
|
500
|
-
<small>Mbrao::Author</small>
|
501
|
-
|
376
|
+
<small>Mbrao::Author</small>
|
502
377
|
</li>
|
503
378
|
|
504
379
|
|
@@ -6,13 +6,13 @@
|
|
6
6
|
<title>
|
7
7
|
Top Level Namespace
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.
|
9
|
+
— Documentation by YARD 0.8.6.2
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
13
|
-
<link rel="stylesheet" href="css/style.css" type="text/css"
|
13
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
|
14
14
|
|
15
|
-
<link rel="stylesheet" href="css/common.css" type="text/css"
|
15
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
|
16
16
|
|
17
17
|
<script type="text/javascript" charset="utf-8">
|
18
18
|
hasFrames = window.top.frames.main ? true : false;
|
@@ -103,9 +103,9 @@
|
|
103
103
|
</div>
|
104
104
|
|
105
105
|
<div id="footer">
|
106
|
-
Generated on Sat
|
106
|
+
Generated on Sat Jul 20 16:09:45 2013 by
|
107
107
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
108
|
-
0.8.
|
108
|
+
0.8.6.2 (ruby-1.9.3).
|
109
109
|
</div>
|
110
110
|
|
111
111
|
</body>
|
data/lib/mbrao/author.rb
CHANGED
@@ -40,7 +40,7 @@ module Mbrao
|
|
40
40
|
@email = Mbrao::Parser.is_email?(email) ? email : nil
|
41
41
|
@website = Mbrao::Parser.is_url?(website) ? website : nil
|
42
42
|
@image = Mbrao::Parser.is_url?(image) ? image : nil
|
43
|
-
@metadata =
|
43
|
+
@metadata = metadata.ensure_hash(:indifferent)
|
44
44
|
@uid = uid
|
45
45
|
end
|
46
46
|
|
data/lib/mbrao/content.rb
CHANGED
@@ -12,7 +12,7 @@ module Mbrao
|
|
12
12
|
# @param locales [Array] The desired locales. Can include `*` to match all. If none are specified, the default mbrao locale will be used.
|
13
13
|
# @return [Boolean] `true` if the content is available for at least one of the desired locales, `false` otherwise.
|
14
14
|
def enabled_for_locales?(*locales)
|
15
|
-
locales =
|
15
|
+
locales = locales.flatten.ensure_array(nil, false, false, true) {|l| l.ensure_string.strip }.reject {|l| l == "*" }
|
16
16
|
@locales.blank? || locales.blank? || (@locales & locales).present?
|
17
17
|
end
|
18
18
|
|
@@ -127,16 +127,16 @@ module Mbrao
|
|
127
127
|
|
128
128
|
# Sets the `locales` attribute.
|
129
129
|
#
|
130
|
-
# @param value [Array] The new value for the attribute.
|
130
|
+
# @param value [Array] The new value for the attribute. A empty or "*" will be the default value.
|
131
131
|
def locales=(value)
|
132
|
-
@locales =
|
132
|
+
@locales = value.ensure_array(nil, true, true, true) {|l| l.ensure_string.strip }
|
133
133
|
end
|
134
134
|
|
135
135
|
# Sets the `title` attribute.
|
136
136
|
#
|
137
137
|
# @param value [String|Hash] The new value for the attribute. If an Hash, keys must be a string with one or locale separated by commas. A empty or "*" will be the default value.
|
138
138
|
def title=(value)
|
139
|
-
@title = value.is_a?(Hash) ?
|
139
|
+
@title = value.is_a?(Hash) ? value.ensure_hash(:indifferent, nil, :ensure_string) : value.ensure_string
|
140
140
|
end
|
141
141
|
|
142
142
|
# Sets the `body` attribute.
|
@@ -151,11 +151,9 @@ module Mbrao
|
|
151
151
|
# @param value [Array|Hash] The new value for the attribute. If an Hash, keys must be a string with one or locale separated by commas. A empty or "*" will be the default value.
|
152
152
|
def tags=(value)
|
153
153
|
@tags = if value.is_a?(Hash) then
|
154
|
-
|
155
|
-
values.each {|k, v| values[k] = Mbrao::Parser.sanitized_array(v, true, true) }
|
156
|
-
@tags = values
|
154
|
+
value.ensure_hash(:indifferent) { |v| v.ensure_array(nil, true, true, true, :ensure_string) }
|
157
155
|
else
|
158
|
-
|
156
|
+
value.ensure_array(nil, true, true, true, :ensure_string)
|
159
157
|
end
|
160
158
|
end
|
161
159
|
|
@@ -163,7 +161,7 @@ module Mbrao
|
|
163
161
|
#
|
164
162
|
# @param value [String|Hash] The new value for the attribute. If an Hash, keys must be a string with one or locale separated by commas. A empty or "*" will be the default value.
|
165
163
|
def more=(value)
|
166
|
-
@more = value.is_a?(Hash) ?
|
164
|
+
@more = value.is_a?(Hash) ? value.ensure_hash(:indifferent, nil, :ensure_string) : value.ensure_string
|
167
165
|
end
|
168
166
|
|
169
167
|
# Sets the `author` attribute.
|
@@ -173,7 +171,7 @@ module Mbrao
|
|
173
171
|
if value.is_a?(Mbrao::Author) then
|
174
172
|
@author = value
|
175
173
|
elsif value.is_a?(Hash) then
|
176
|
-
value =
|
174
|
+
value = value.ensure_hash(:indifferent)
|
177
175
|
@author = Mbrao::Author.new(value["name"], value["email"], value["website"], value["image"], value["metadata"], value["uid"])
|
178
176
|
else
|
179
177
|
@author = Mbrao::Author.new(value.ensure_string)
|
@@ -207,7 +205,7 @@ module Mbrao
|
|
207
205
|
# @param value [Hash] The new value for the attribute.
|
208
206
|
def metadata=(value)
|
209
207
|
if value.is_a?(Hash) then
|
210
|
-
@metadata =
|
208
|
+
@metadata = value.ensure_hash(:indifferent)
|
211
209
|
else
|
212
210
|
@metadata = HashWithIndifferentAccess.new({raw: value})
|
213
211
|
end
|
@@ -219,7 +217,7 @@ module Mbrao
|
|
219
217
|
# @param content [Content|nil] An optional content to check for availability
|
220
218
|
# @return [Array] The validated list of locales.
|
221
219
|
def self.validate_locales(locales, content = nil)
|
222
|
-
locales =
|
220
|
+
locales = locales.ensure_array(nil, true, true, true) {|l| l.ensure_string.strip }
|
223
221
|
locales = (locales.empty? ? [Mbrao::Parser.locale] : locales)
|
224
222
|
raise Mbrao::Exceptions::UnavailableLocalization.new if content && !content.enabled_for_locales?(locales)
|
225
223
|
locales
|