mbrao 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +6 -0
- data/.travis-gemfile +13 -0
- data/.travis.yml +8 -0
- data/.yardopts +1 -0
- data/Gemfile +21 -0
- data/README.md +60 -0
- data/Rakefile +11 -0
- data/doc/ActionView/Template/Handlers/MbraoTemplate.html +568 -0
- data/doc/ActionView/Template/Handlers.html +125 -0
- data/doc/HTML/Pipeline/KramdownFilter.html +354 -0
- data/doc/HTML/Pipeline.html +140 -0
- data/doc/HTML.html +125 -0
- data/doc/Mbrao/Author.html +1402 -0
- data/doc/Mbrao/Content.html +4779 -0
- data/doc/Mbrao/ContentPublicInterface.html +658 -0
- data/doc/Mbrao/Exceptions/InvalidDate.html +133 -0
- data/doc/Mbrao/Exceptions/InvalidMetadata.html +133 -0
- data/doc/Mbrao/Exceptions/Parsing.html +133 -0
- data/doc/Mbrao/Exceptions/Rendering.html +133 -0
- data/doc/Mbrao/Exceptions/UnavailableLocalization.html +133 -0
- data/doc/Mbrao/Exceptions/Unimplemented.html +133 -0
- data/doc/Mbrao/Exceptions/UnknownEngine.html +133 -0
- data/doc/Mbrao/Exceptions.html +125 -0
- data/doc/Mbrao/Parser.html +418 -0
- data/doc/Mbrao/ParsingEngines/Base.html +658 -0
- data/doc/Mbrao/ParsingEngines/PlainText.html +571 -0
- data/doc/Mbrao/ParsingEngines.html +127 -0
- data/doc/Mbrao/PublicInterface/ClassMethods.html +1727 -0
- data/doc/Mbrao/PublicInterface.html +134 -0
- data/doc/Mbrao/RenderingEngines/Base.html +280 -0
- data/doc/Mbrao/RenderingEngines/HtmlPipeline.html +873 -0
- data/doc/Mbrao/RenderingEngines.html +127 -0
- data/doc/Mbrao/Validations/ClassMethods.html +692 -0
- data/doc/Mbrao/Validations.html +134 -0
- data/doc/Mbrao/Version.html +189 -0
- data/doc/Mbrao.html +130 -0
- data/doc/_index.html +395 -0
- data/doc/class_list.html +53 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +57 -0
- data/doc/css/style.css +338 -0
- data/doc/file.README.html +135 -0
- data/doc/file_list.html +55 -0
- data/doc/frames.html +28 -0
- data/doc/index.html +135 -0
- data/doc/js/app.js +214 -0
- data/doc/js/full_list.js +173 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +516 -0
- data/doc/top-level-namespace.html +112 -0
- data/lib/mbrao/author.rb +61 -0
- data/lib/mbrao/content.rb +300 -0
- data/lib/mbrao/exceptions.rb +38 -0
- data/lib/mbrao/integrations/rails.rb +51 -0
- data/lib/mbrao/parser.rb +276 -0
- data/lib/mbrao/parsing_engines/base.rb +51 -0
- data/lib/mbrao/parsing_engines/plain_text.rb +187 -0
- data/lib/mbrao/rendering_engines/base.rb +22 -0
- data/lib/mbrao/rendering_engines/html_pipeline.rb +147 -0
- data/lib/mbrao/version.rb +25 -0
- data/lib/mbrao.rb +24 -0
- data/mbrao.gemspec +31 -0
- data/spec/coverage_helper.rb +17 -0
- data/spec/mbrao/author_spec.rb +62 -0
- data/spec/mbrao/content_spec.rb +280 -0
- data/spec/mbrao/integrations/rails_spec.rb +92 -0
- data/spec/mbrao/parser_spec.rb +269 -0
- data/spec/mbrao/parsing_engines/base_spec.rb +52 -0
- data/spec/mbrao/parsing_engines/plain_text_spec.rb +141 -0
- data/spec/mbrao/rendering_engines/base_spec.rb +17 -0
- data/spec/mbrao/rendering_engines/html_pipeline_spec.rb +128 -0
- data/spec/spec_helper.rb +15 -0
- metadata +195 -0
@@ -0,0 +1,516 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
+
|
7
|
+
<link rel="stylesheet" href="css/full_list.css" type="text/css" media="screen" charset="utf-8" />
|
8
|
+
|
9
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
14
|
+
|
15
|
+
<script type="text/javascript" charset="utf-8" src="js/full_list.js"></script>
|
16
|
+
|
17
|
+
|
18
|
+
<base id="base_target" target="_parent" />
|
19
|
+
</head>
|
20
|
+
<body>
|
21
|
+
<script type="text/javascript" charset="utf-8">
|
22
|
+
if (window.top.frames.main) {
|
23
|
+
document.getElementById('base_target').target = 'main';
|
24
|
+
document.body.className = 'frames';
|
25
|
+
}
|
26
|
+
</script>
|
27
|
+
<div id="content">
|
28
|
+
<h1 id="full_list_header">Method List</h1>
|
29
|
+
<div id="nav">
|
30
|
+
|
31
|
+
<span><a target="_self" href="class_list.html">
|
32
|
+
Classes
|
33
|
+
</a></span>
|
34
|
+
|
35
|
+
<span><a target="_self" href="method_list.html">
|
36
|
+
Methods
|
37
|
+
</a></span>
|
38
|
+
|
39
|
+
<span><a target="_self" href="file_list.html">
|
40
|
+
Files
|
41
|
+
</a></span>
|
42
|
+
|
43
|
+
</div>
|
44
|
+
<div id="search">Search: <input type="text" /></div>
|
45
|
+
|
46
|
+
<ul id="full_list" class="method">
|
47
|
+
|
48
|
+
|
49
|
+
<li class="r1 ">
|
50
|
+
<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
|
+
|
54
|
+
</li>
|
55
|
+
|
56
|
+
|
57
|
+
<li class="r2 ">
|
58
|
+
<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
|
+
|
62
|
+
</li>
|
63
|
+
|
64
|
+
|
65
|
+
<li class="r1 ">
|
66
|
+
<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
|
+
|
70
|
+
</li>
|
71
|
+
|
72
|
+
|
73
|
+
<li class="r2 ">
|
74
|
+
<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
|
+
|
78
|
+
</li>
|
79
|
+
|
80
|
+
|
81
|
+
<li class="r1 ">
|
82
|
+
<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
|
+
|
86
|
+
</li>
|
87
|
+
|
88
|
+
|
89
|
+
<li class="r2 ">
|
90
|
+
<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
|
+
|
94
|
+
</li>
|
95
|
+
|
96
|
+
|
97
|
+
<li class="r1 ">
|
98
|
+
<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
|
+
|
102
|
+
</li>
|
103
|
+
|
104
|
+
|
105
|
+
<li class="r2 ">
|
106
|
+
<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
|
+
|
110
|
+
</li>
|
111
|
+
|
112
|
+
|
113
|
+
<li class="r1 ">
|
114
|
+
<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
|
+
|
118
|
+
</li>
|
119
|
+
|
120
|
+
|
121
|
+
<li class="r2 ">
|
122
|
+
<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
|
+
|
126
|
+
</li>
|
127
|
+
|
128
|
+
|
129
|
+
<li class="r1 ">
|
130
|
+
<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
|
+
|
134
|
+
</li>
|
135
|
+
|
136
|
+
|
137
|
+
<li class="r2 ">
|
138
|
+
<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
|
+
|
142
|
+
</li>
|
143
|
+
|
144
|
+
|
145
|
+
<li class="r1 ">
|
146
|
+
<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
|
+
|
150
|
+
</li>
|
151
|
+
|
152
|
+
|
153
|
+
<li class="r2 ">
|
154
|
+
<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>
|
155
|
+
|
156
|
+
<small>Mbrao::ParsingEngines::Base</small>
|
157
|
+
|
158
|
+
</li>
|
159
|
+
|
160
|
+
|
161
|
+
<li class="r1 ">
|
162
|
+
<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>
|
163
|
+
|
164
|
+
<small>Mbrao::ParsingEngines::PlainText</small>
|
165
|
+
|
166
|
+
</li>
|
167
|
+
|
168
|
+
|
169
|
+
<li class="r2 ">
|
170
|
+
<span class='object_link'><a href="Mbrao/PublicInterface/ClassMethods.html#find_class-instance_method" title="Mbrao::PublicInterface::ClassMethods#find_class (method)">#find_class</a></span>
|
171
|
+
|
172
|
+
<small>Mbrao::PublicInterface::ClassMethods</small>
|
173
|
+
|
174
|
+
</li>
|
175
|
+
|
176
|
+
|
177
|
+
<li class="r1 ">
|
178
|
+
<span class='object_link'><a href="Mbrao/ContentPublicInterface.html#get_body-instance_method" title="Mbrao::ContentPublicInterface#get_body (method)">#get_body</a></span>
|
179
|
+
|
180
|
+
<small>Mbrao::ContentPublicInterface</small>
|
181
|
+
|
182
|
+
</li>
|
183
|
+
|
184
|
+
|
185
|
+
<li class="r2 ">
|
186
|
+
<span class='object_link'><a href="Mbrao/ContentPublicInterface.html#get_more-instance_method" title="Mbrao::ContentPublicInterface#get_more (method)">#get_more</a></span>
|
187
|
+
|
188
|
+
<small>Mbrao::ContentPublicInterface</small>
|
189
|
+
|
190
|
+
</li>
|
191
|
+
|
192
|
+
|
193
|
+
<li class="r1 ">
|
194
|
+
<span class='object_link'><a href="Mbrao/ContentPublicInterface.html#get_tags-instance_method" title="Mbrao::ContentPublicInterface#get_tags (method)">#get_tags</a></span>
|
195
|
+
|
196
|
+
<small>Mbrao::ContentPublicInterface</small>
|
197
|
+
|
198
|
+
</li>
|
199
|
+
|
200
|
+
|
201
|
+
<li class="r2 ">
|
202
|
+
<span class='object_link'><a href="Mbrao/ContentPublicInterface.html#get_title-instance_method" title="Mbrao::ContentPublicInterface#get_title (method)">#get_title</a></span>
|
203
|
+
|
204
|
+
<small>Mbrao::ContentPublicInterface</small>
|
205
|
+
|
206
|
+
</li>
|
207
|
+
|
208
|
+
|
209
|
+
<li class="r1 ">
|
210
|
+
<span class='object_link'><a href="Mbrao/Author.html#image-instance_method" title="Mbrao::Author#image (method)">#image</a></span>
|
211
|
+
|
212
|
+
<small>Mbrao::Author</small>
|
213
|
+
|
214
|
+
</li>
|
215
|
+
|
216
|
+
|
217
|
+
<li class="r2 ">
|
218
|
+
<span class='object_link'><a href="Mbrao/Author.html#initialize-instance_method" title="Mbrao::Author#initialize (method)">#initialize</a></span>
|
219
|
+
|
220
|
+
<small>Mbrao::Author</small>
|
221
|
+
|
222
|
+
</li>
|
223
|
+
|
224
|
+
|
225
|
+
<li class="r1 ">
|
226
|
+
<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
|
+
|
230
|
+
</li>
|
231
|
+
|
232
|
+
|
233
|
+
<li class="r2 ">
|
234
|
+
<span class='object_link'><a href="HTML/Pipeline/KramdownFilter.html#initialize-instance_method" title="HTML::Pipeline::KramdownFilter#initialize (method)">#initialize</a></span>
|
235
|
+
|
236
|
+
<small>HTML::Pipeline::KramdownFilter</small>
|
237
|
+
|
238
|
+
</li>
|
239
|
+
|
240
|
+
|
241
|
+
<li class="r1 ">
|
242
|
+
<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
|
+
|
246
|
+
</li>
|
247
|
+
|
248
|
+
|
249
|
+
<li class="r2 ">
|
250
|
+
<span class='object_link'><a href="Mbrao/PublicInterface/ClassMethods.html#instance-instance_method" title="Mbrao::PublicInterface::ClassMethods#instance (method)">#instance</a></span>
|
251
|
+
|
252
|
+
<small>Mbrao::PublicInterface::ClassMethods</small>
|
253
|
+
|
254
|
+
</li>
|
255
|
+
|
256
|
+
|
257
|
+
<li class="r1 ">
|
258
|
+
<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>
|
259
|
+
|
260
|
+
<small>Mbrao::Validations::ClassMethods</small>
|
261
|
+
|
262
|
+
</li>
|
263
|
+
|
264
|
+
|
265
|
+
<li class="r2 ">
|
266
|
+
<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>
|
267
|
+
|
268
|
+
<small>Mbrao::Validations::ClassMethods</small>
|
269
|
+
|
270
|
+
</li>
|
271
|
+
|
272
|
+
|
273
|
+
<li class="r1 ">
|
274
|
+
<span class='object_link'><a href="Mbrao/PublicInterface/ClassMethods.html#locale-instance_method" title="Mbrao::PublicInterface::ClassMethods#locale (method)">#locale</a></span>
|
275
|
+
|
276
|
+
<small>Mbrao::PublicInterface::ClassMethods</small>
|
277
|
+
|
278
|
+
</li>
|
279
|
+
|
280
|
+
|
281
|
+
<li class="r2 ">
|
282
|
+
<span class='object_link'><a href="Mbrao/Content.html#locales-instance_method" title="Mbrao::Content#locales (method)">#locales</a></span>
|
283
|
+
|
284
|
+
<small>Mbrao::Content</small>
|
285
|
+
|
286
|
+
</li>
|
287
|
+
|
288
|
+
|
289
|
+
<li class="r1 ">
|
290
|
+
<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
|
+
|
294
|
+
</li>
|
295
|
+
|
296
|
+
|
297
|
+
<li class="r2 ">
|
298
|
+
<span class='object_link'><a href="Mbrao/Author.html#metadata-instance_method" title="Mbrao::Author#metadata (method)">#metadata</a></span>
|
299
|
+
|
300
|
+
<small>Mbrao::Author</small>
|
301
|
+
|
302
|
+
</li>
|
303
|
+
|
304
|
+
|
305
|
+
<li class="r1 ">
|
306
|
+
<span class='object_link'><a href="Mbrao/Content.html#more-instance_method" title="Mbrao::Content#more (method)">#more</a></span>
|
307
|
+
|
308
|
+
<small>Mbrao::Content</small>
|
309
|
+
|
310
|
+
</li>
|
311
|
+
|
312
|
+
|
313
|
+
<li class="r2 ">
|
314
|
+
<span class='object_link'><a href="Mbrao/Author.html#name-instance_method" title="Mbrao::Author#name (method)">#name</a></span>
|
315
|
+
|
316
|
+
<small>Mbrao::Author</small>
|
317
|
+
|
318
|
+
</li>
|
319
|
+
|
320
|
+
|
321
|
+
<li class="r1 ">
|
322
|
+
<span class='object_link'><a href="Mbrao/Parser.html#parse-instance_method" title="Mbrao::Parser#parse (method)">#parse</a></span>
|
323
|
+
|
324
|
+
<small>Mbrao::Parser</small>
|
325
|
+
|
326
|
+
</li>
|
327
|
+
|
328
|
+
|
329
|
+
<li class="r2 ">
|
330
|
+
<span class='object_link'><a href="Mbrao/PublicInterface/ClassMethods.html#parse-instance_method" title="Mbrao::PublicInterface::ClassMethods#parse (method)">#parse</a></span>
|
331
|
+
|
332
|
+
<small>Mbrao::PublicInterface::ClassMethods</small>
|
333
|
+
|
334
|
+
</li>
|
335
|
+
|
336
|
+
|
337
|
+
<li class="r1 ">
|
338
|
+
<span class='object_link'><a href="Mbrao/ParsingEngines/Base.html#parse-instance_method" title="Mbrao::ParsingEngines::Base#parse (method)">#parse</a></span>
|
339
|
+
|
340
|
+
<small>Mbrao::ParsingEngines::Base</small>
|
341
|
+
|
342
|
+
</li>
|
343
|
+
|
344
|
+
|
345
|
+
<li class="r2 ">
|
346
|
+
<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>
|
347
|
+
|
348
|
+
<small>Mbrao::ParsingEngines::PlainText</small>
|
349
|
+
|
350
|
+
</li>
|
351
|
+
|
352
|
+
|
353
|
+
<li class="r1 ">
|
354
|
+
<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>
|
355
|
+
|
356
|
+
<small>Mbrao::ParsingEngines::Base</small>
|
357
|
+
|
358
|
+
</li>
|
359
|
+
|
360
|
+
|
361
|
+
<li class="r2 ">
|
362
|
+
<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>
|
363
|
+
|
364
|
+
<small>Mbrao::PublicInterface::ClassMethods</small>
|
365
|
+
|
366
|
+
</li>
|
367
|
+
|
368
|
+
|
369
|
+
<li class="r1 ">
|
370
|
+
<span class='object_link'><a href="Mbrao/Parser.html#render-instance_method" title="Mbrao::Parser#render (method)">#render</a></span>
|
371
|
+
|
372
|
+
<small>Mbrao::Parser</small>
|
373
|
+
|
374
|
+
</li>
|
375
|
+
|
376
|
+
|
377
|
+
<li class="r2 ">
|
378
|
+
<span class='object_link'><a href="Mbrao/RenderingEngines/HtmlPipeline.html#render-instance_method" title="Mbrao::RenderingEngines::HtmlPipeline#render (method)">#render</a></span>
|
379
|
+
|
380
|
+
<small>Mbrao::RenderingEngines::HtmlPipeline</small>
|
381
|
+
|
382
|
+
</li>
|
383
|
+
|
384
|
+
|
385
|
+
<li class="r1 ">
|
386
|
+
<span class='object_link'><a href="ActionView/Template/Handlers/MbraoTemplate.html#render-instance_method" title="ActionView::Template::Handlers::MbraoTemplate#render (method)">#render</a></span>
|
387
|
+
|
388
|
+
<small>ActionView::Template::Handlers::MbraoTemplate</small>
|
389
|
+
|
390
|
+
</li>
|
391
|
+
|
392
|
+
|
393
|
+
<li class="r2 ">
|
394
|
+
<span class='object_link'><a href="Mbrao/RenderingEngines/Base.html#render-instance_method" title="Mbrao::RenderingEngines::Base#render (method)">#render</a></span>
|
395
|
+
|
396
|
+
<small>Mbrao::RenderingEngines::Base</small>
|
397
|
+
|
398
|
+
</li>
|
399
|
+
|
400
|
+
|
401
|
+
<li class="r1 ">
|
402
|
+
<span class='object_link'><a href="Mbrao/PublicInterface/ClassMethods.html#render-instance_method" title="Mbrao::PublicInterface::ClassMethods#render (method)">#render</a></span>
|
403
|
+
|
404
|
+
<small>Mbrao::PublicInterface::ClassMethods</small>
|
405
|
+
|
406
|
+
</li>
|
407
|
+
|
408
|
+
|
409
|
+
<li class="r2 ">
|
410
|
+
<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>
|
411
|
+
|
412
|
+
<small>Mbrao::PublicInterface::ClassMethods</small>
|
413
|
+
|
414
|
+
</li>
|
415
|
+
|
416
|
+
|
417
|
+
<li class="r1 ">
|
418
|
+
<span class='object_link'><a href="Mbrao/Validations/ClassMethods.html#sanitized_array-instance_method" title="Mbrao::Validations::ClassMethods#sanitized_array (method)">#sanitized_array</a></span>
|
419
|
+
|
420
|
+
<small>Mbrao::Validations::ClassMethods</small>
|
421
|
+
|
422
|
+
</li>
|
423
|
+
|
424
|
+
|
425
|
+
<li class="r2 ">
|
426
|
+
<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>
|
427
|
+
|
428
|
+
<small>Mbrao::Validations::ClassMethods</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
|
+
|
438
|
+
</li>
|
439
|
+
|
440
|
+
|
441
|
+
<li class="r2 ">
|
442
|
+
<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>
|
443
|
+
|
444
|
+
<small>Mbrao::ParsingEngines::Base</small>
|
445
|
+
|
446
|
+
</li>
|
447
|
+
|
448
|
+
|
449
|
+
<li class="r1 ">
|
450
|
+
<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>
|
451
|
+
|
452
|
+
<small>ActionView::Template::Handlers::MbraoTemplate</small>
|
453
|
+
|
454
|
+
</li>
|
455
|
+
|
456
|
+
|
457
|
+
<li class="r2 ">
|
458
|
+
<span class='object_link'><a href="Mbrao/Content.html#tags-instance_method" title="Mbrao::Content#tags (method)">#tags</a></span>
|
459
|
+
|
460
|
+
<small>Mbrao::Content</small>
|
461
|
+
|
462
|
+
</li>
|
463
|
+
|
464
|
+
|
465
|
+
<li class="r1 ">
|
466
|
+
<span class='object_link'><a href="Mbrao/Content.html#title-instance_method" title="Mbrao::Content#title (method)">#title</a></span>
|
467
|
+
|
468
|
+
<small>Mbrao::Content</small>
|
469
|
+
|
470
|
+
</li>
|
471
|
+
|
472
|
+
|
473
|
+
<li class="r2 ">
|
474
|
+
<span class='object_link'><a href="Mbrao/Author.html#uid-instance_method" title="Mbrao::Author#uid (method)">#uid</a></span>
|
475
|
+
|
476
|
+
<small>Mbrao::Author</small>
|
477
|
+
|
478
|
+
</li>
|
479
|
+
|
480
|
+
|
481
|
+
<li class="r1 ">
|
482
|
+
<span class='object_link'><a href="Mbrao/Content.html#uid-instance_method" title="Mbrao::Content#uid (method)">#uid</a></span>
|
483
|
+
|
484
|
+
<small>Mbrao::Content</small>
|
485
|
+
|
486
|
+
</li>
|
487
|
+
|
488
|
+
|
489
|
+
<li class="r2 ">
|
490
|
+
<span class='object_link'><a href="Mbrao/Content.html#updated_at-instance_method" title="Mbrao::Content#updated_at (method)">#updated_at</a></span>
|
491
|
+
|
492
|
+
<small>Mbrao::Content</small>
|
493
|
+
|
494
|
+
</li>
|
495
|
+
|
496
|
+
|
497
|
+
<li class="r1 ">
|
498
|
+
<span class='object_link'><a href="Mbrao/Content.html#validate_locales-class_method" title="Mbrao::Content.validate_locales (method)">validate_locales</a></span>
|
499
|
+
|
500
|
+
<small>Mbrao::Content</small>
|
501
|
+
|
502
|
+
</li>
|
503
|
+
|
504
|
+
|
505
|
+
<li class="r2 ">
|
506
|
+
<span class='object_link'><a href="Mbrao/Author.html#website-instance_method" title="Mbrao::Author#website (method)">#website</a></span>
|
507
|
+
|
508
|
+
<small>Mbrao::Author</small>
|
509
|
+
|
510
|
+
</li>
|
511
|
+
|
512
|
+
|
513
|
+
</ul>
|
514
|
+
</div>
|
515
|
+
</body>
|
516
|
+
</html>
|
@@ -0,0 +1,112 @@
|
|
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
|
+
Top Level Namespace
|
8
|
+
|
9
|
+
— 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</a> »
|
35
|
+
|
36
|
+
|
37
|
+
<span class="title">Top Level Namespace</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>Top Level Namespace
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
</h1>
|
71
|
+
|
72
|
+
<dl class="box">
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
</dl>
|
82
|
+
<div class="clear"></div>
|
83
|
+
|
84
|
+
<h2>Defined Under Namespace</h2>
|
85
|
+
<p class="children">
|
86
|
+
|
87
|
+
|
88
|
+
<strong class="modules">Modules:</strong> <span class='object_link'><a href="HTML.html" title="HTML (module)">HTML</a></span>, <span class='object_link'><a href="Mbrao.html" title="Mbrao (module)">Mbrao</a></span>
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
</p>
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
</div>
|
104
|
+
|
105
|
+
<div id="footer">
|
106
|
+
Generated on Fri Mar 1 09:13:30 2013 by
|
107
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
108
|
+
0.8.5.2 (ruby-1.9.3).
|
109
|
+
</div>
|
110
|
+
|
111
|
+
</body>
|
112
|
+
</html>
|
data/lib/mbrao/author.rb
ADDED
@@ -0,0 +1,61 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
#
|
3
|
+
# This file is part of the mbrao gem. Copyright (C) 2013 and above Shogun <shogun_panda@me.com>.
|
4
|
+
# Licensed under the MIT license, which can be found at http://www.opensource.org/licenses/mit-license.php.
|
5
|
+
#
|
6
|
+
|
7
|
+
module Mbrao
|
8
|
+
# Represents the author of a parsed content, with its metadata.
|
9
|
+
#
|
10
|
+
# @attribute uid
|
11
|
+
# @return [String] A unique ID for this post. This is only for client uses.
|
12
|
+
# @attribute name
|
13
|
+
# @return [String] The name of the author.
|
14
|
+
# @attribute email
|
15
|
+
# @return [String] The email of the author.
|
16
|
+
# @attribute website
|
17
|
+
# @return [String] The website of the author.
|
18
|
+
# @attribute image
|
19
|
+
# @return [String] The URL of the avatar of the author.
|
20
|
+
# @attribute metadata
|
21
|
+
# @return [HashWithIndifferentAccess] The full list of metadata of this author.
|
22
|
+
class Author
|
23
|
+
attr_accessor :uid
|
24
|
+
attr_accessor :name
|
25
|
+
attr_accessor :email
|
26
|
+
attr_accessor :website
|
27
|
+
attr_accessor :image
|
28
|
+
attr_accessor :metadata
|
29
|
+
|
30
|
+
# Creates a new author.
|
31
|
+
#
|
32
|
+
# @param name [String] The name of the author.
|
33
|
+
# @param email [String] The email of the author.
|
34
|
+
# @param website [String] The website of the author.
|
35
|
+
# @param image [String] The URL of the avatar of the author.
|
36
|
+
# @param metadata [HashWithIndifferentAccess] The full list of metadata of this author.
|
37
|
+
# @param uid [String] A unique ID for this post. This is only for client uses.
|
38
|
+
def initialize(name, email = nil, website = nil, image = nil, metadata = nil, uid = nil)
|
39
|
+
@name = name.ensure_string
|
40
|
+
@email = Mbrao::Parser.is_email?(email) ? email : nil
|
41
|
+
@website = Mbrao::Parser.is_url?(website) ? website : nil
|
42
|
+
@image = Mbrao::Parser.is_url?(image) ? image : nil
|
43
|
+
@metadata = Mbrao::Parser.sanitized_hash(metadata)
|
44
|
+
@uid = uid
|
45
|
+
end
|
46
|
+
|
47
|
+
# Creates an author from a `Hash`.
|
48
|
+
#
|
49
|
+
# @param data [Hash] The data of the author
|
50
|
+
# @return [Author] A new author.
|
51
|
+
def self.create(data)
|
52
|
+
if data.is_a?(Hash) then
|
53
|
+
data = HashWithIndifferentAccess.new(data)
|
54
|
+
uid = data.delete(:uid)
|
55
|
+
Mbrao::Author.new(data.delete(:name), data.delete(:email), data.delete(:website), data.delete(:image), data, uid)
|
56
|
+
else
|
57
|
+
Mbrao::Author.new(data)
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|