kharon 1.1.0 → 1.1.1
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.
- checksums.yaml +5 -13
- data/{.rspec → .rspec.old} +0 -0
- data/Gemfile +1 -0
- data/Gemfile.lock +12 -4
- data/dist/kharon-1.1.0.gem +0 -0
- data/doc/Kharon.html +384 -6
- data/doc/Kharon/Errors.html +1 -1
- data/doc/Kharon/Errors/Validation.html +1 -1
- data/doc/Kharon/Handlers.html +1 -1
- data/doc/Kharon/Handlers/Exceptions.html +1 -1
- data/doc/Kharon/Handlers/Messages.html +1 -1
- data/doc/Kharon/Processor.html +425 -0
- data/doc/Kharon/Processors.html +144 -0
- data/doc/Kharon/Processors/ArrayProcessor.html +429 -0
- data/doc/Kharon/Processors/BooleanProcessor.html +306 -0
- data/doc/Kharon/Processors/BoxProcessor.html +440 -0
- data/doc/Kharon/Processors/DateProcessor.html +306 -0
- data/doc/Kharon/Processors/DatetimeProcessor.html +306 -0
- data/doc/Kharon/Processors/EmailProcessor.html +307 -0
- data/doc/Kharon/Processors/HashProcessor.html +431 -0
- data/doc/Kharon/Processors/IntegerProcessor.html +441 -0
- data/doc/Kharon/Processors/NumericProcessor.html +463 -0
- data/doc/Kharon/Processors/SSIDProcessor.html +307 -0
- data/doc/Kharon/Processors/TextProcessor.html +430 -0
- data/doc/Kharon/Validate.html +17 -5
- data/doc/Kharon/Validator.html +198 -1194
- data/doc/_index.html +159 -1
- data/doc/class_list.html +1 -1
- data/doc/file.README.html +15 -4
- data/doc/index.html +15 -4
- data/doc/method_list.html +135 -39
- data/doc/top-level-namespace.html +1 -1
- data/kharon.gemspec +4 -2
- data/lib/kharon.rb +32 -2
- data/lib/kharon/processor.rb +162 -0
- data/lib/kharon/processors.rb +6 -0
- data/lib/kharon/processors/array_processor.rb +30 -0
- data/lib/kharon/processors/boolean_processor.rb +31 -0
- data/lib/kharon/processors/box_processor.rb +63 -0
- data/lib/kharon/processors/date_processor.rb +21 -0
- data/lib/kharon/processors/datetime_processor.rb +21 -0
- data/lib/kharon/processors/email_processor.rb +21 -0
- data/lib/kharon/processors/hash_processor.rb +31 -0
- data/lib/kharon/processors/integer_processor.rb +55 -0
- data/lib/kharon/processors/numeric_processor.rb +66 -0
- data/lib/kharon/processors/ssid_processor.rb +21 -0
- data/lib/kharon/processors/text_processor.rb +30 -0
- data/lib/kharon/validate.rb +1 -1
- data/lib/kharon/validator.rb +26 -390
- data/lib/kharon/version.rb +1 -1
- data/spec/results.html +5277 -321
- metadata +69 -28
data/doc/Kharon/Errors.html
CHANGED
@@ -136,7 +136,7 @@ the application.</p>
|
|
136
136
|
</div>
|
137
137
|
|
138
138
|
<div id="footer">
|
139
|
-
Generated on
|
139
|
+
Generated on Thu Jun 2 16:20:55 2016 by
|
140
140
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
141
141
|
0.8.7.6 (ruby-1.9.3).
|
142
142
|
</div>
|
@@ -427,7 +427,7 @@ error in the validation.</p>
|
|
427
427
|
</div>
|
428
428
|
|
429
429
|
<div id="footer">
|
430
|
-
Generated on
|
430
|
+
Generated on Thu Jun 2 16:20:55 2016 by
|
431
431
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
432
432
|
0.8.7.6 (ruby-1.9.3).
|
433
433
|
</div>
|
data/doc/Kharon/Handlers.html
CHANGED
@@ -135,7 +135,7 @@
|
|
135
135
|
</div>
|
136
136
|
|
137
137
|
<div id="footer">
|
138
|
-
Generated on
|
138
|
+
Generated on Thu Jun 2 16:20:55 2016 by
|
139
139
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
140
140
|
0.8.7.6 (ruby-1.9.3).
|
141
141
|
</div>
|
@@ -264,7 +264,7 @@ during validation.</p>
|
|
264
264
|
</div>
|
265
265
|
|
266
266
|
<div id="footer">
|
267
|
-
Generated on
|
267
|
+
Generated on Thu Jun 2 16:20:55 2016 by
|
268
268
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
269
269
|
0.8.7.6 (ruby-1.9.3).
|
270
270
|
</div>
|
@@ -416,7 +416,7 @@ the report_error method</p>
|
|
416
416
|
</div>
|
417
417
|
|
418
418
|
<div id="footer">
|
419
|
-
Generated on
|
419
|
+
Generated on Thu Jun 2 16:20:55 2016 by
|
420
420
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
421
421
|
0.8.7.6 (ruby-1.9.3).
|
422
422
|
</div>
|
@@ -0,0 +1,425 @@
|
|
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
|
+
Class: Kharon::Processor
|
8
|
+
|
9
|
+
— Documentation by YARD 0.8.7.6
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
hasFrames = window.top.frames.main ? true : false;
|
19
|
+
relpath = '../';
|
20
|
+
framesUrl = "../frames.html#!Kharon/Processor.html";
|
21
|
+
</script>
|
22
|
+
|
23
|
+
|
24
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
25
|
+
|
26
|
+
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
27
|
+
|
28
|
+
|
29
|
+
</head>
|
30
|
+
<body>
|
31
|
+
<div id="header">
|
32
|
+
<div id="menu">
|
33
|
+
|
34
|
+
<a href="../_index.html">Index (P)</a> »
|
35
|
+
<span class='title'><span class='object_link'><a href="../Kharon.html" title="Kharon (module)">Kharon</a></span></span>
|
36
|
+
»
|
37
|
+
<span class="title">Processor</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>Class: Kharon::Processor
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
</h1>
|
71
|
+
|
72
|
+
<dl class="box">
|
73
|
+
|
74
|
+
<dt class="r1">Inherits:</dt>
|
75
|
+
<dd class="r1">
|
76
|
+
<span class="inheritName">Object</span>
|
77
|
+
|
78
|
+
<ul class="fullTree">
|
79
|
+
<li>Object</li>
|
80
|
+
|
81
|
+
<li class="next">Kharon::Processor</li>
|
82
|
+
|
83
|
+
</ul>
|
84
|
+
<a href="#" class="inheritanceTree">show all</a>
|
85
|
+
|
86
|
+
</dd>
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
<dt class="r2 last">Defined in:</dt>
|
97
|
+
<dd class="r2 last">lib/kharon/processor.rb</dd>
|
98
|
+
|
99
|
+
</dl>
|
100
|
+
<div class="clear"></div>
|
101
|
+
|
102
|
+
<h2>Overview</h2><div class="docstring">
|
103
|
+
<div class="discussion">
|
104
|
+
|
105
|
+
<p>A basic processor used to be subclassed by all different processors. It
|
106
|
+
provides basic informations to process a hash key validation.</p>
|
107
|
+
|
108
|
+
|
109
|
+
</div>
|
110
|
+
</div>
|
111
|
+
<div class="tags">
|
112
|
+
|
113
|
+
<p class="tag_title">Author:</p>
|
114
|
+
<ul class="author">
|
115
|
+
|
116
|
+
<li>
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
<div class='inline'>
|
123
|
+
<p>Vincent Courtois <courtois.vincent@outlook.com></p>
|
124
|
+
</div>
|
125
|
+
|
126
|
+
</li>
|
127
|
+
|
128
|
+
</ul>
|
129
|
+
|
130
|
+
</div><div id="subclasses">
|
131
|
+
<h2>Direct Known Subclasses</h2>
|
132
|
+
<p class="children"><span class='object_link'><a href="Processors/ArrayProcessor.html" title="Kharon::Processors::ArrayProcessor (class)">Kharon::Processors::ArrayProcessor</a></span>, <span class='object_link'><a href="Processors/BooleanProcessor.html" title="Kharon::Processors::BooleanProcessor (class)">Kharon::Processors::BooleanProcessor</a></span>, <span class='object_link'><a href="Processors/BoxProcessor.html" title="Kharon::Processors::BoxProcessor (class)">Kharon::Processors::BoxProcessor</a></span>, <span class='object_link'><a href="Processors/DateProcessor.html" title="Kharon::Processors::DateProcessor (class)">Kharon::Processors::DateProcessor</a></span>, <span class='object_link'><a href="Processors/DatetimeProcessor.html" title="Kharon::Processors::DatetimeProcessor (class)">Kharon::Processors::DatetimeProcessor</a></span>, <span class='object_link'><a href="Processors/EmailProcessor.html" title="Kharon::Processors::EmailProcessor (class)">Kharon::Processors::EmailProcessor</a></span>, <span class='object_link'><a href="Processors/HashProcessor.html" title="Kharon::Processors::HashProcessor (class)">Kharon::Processors::HashProcessor</a></span>, <span class='object_link'><a href="Processors/IntegerProcessor.html" title="Kharon::Processors::IntegerProcessor (class)">Kharon::Processors::IntegerProcessor</a></span>, <span class='object_link'><a href="Processors/NumericProcessor.html" title="Kharon::Processors::NumericProcessor (class)">Kharon::Processors::NumericProcessor</a></span>, <span class='object_link'><a href="Processors/SSIDProcessor.html" title="Kharon::Processors::SSIDProcessor (class)">Kharon::Processors::SSIDProcessor</a></span>, <span class='object_link'><a href="Processors/TextProcessor.html" title="Kharon::Processors::TextProcessor (class)">Kharon::Processors::TextProcessor</a></span></p>
|
133
|
+
</div>
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
<h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
|
139
|
+
<ul class="summary">
|
140
|
+
|
141
|
+
<li class="public ">
|
142
|
+
<span class="summary_signature">
|
143
|
+
|
144
|
+
<a href="#validator-instance_method" title="#validator (instance method)">- (Object) <strong>validator</strong> </a>
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
</span>
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
<span class="summary_desc"><div class='inline'>
|
162
|
+
<p>Returns the value of attribute validator.</p>
|
163
|
+
</div></span>
|
164
|
+
|
165
|
+
</li>
|
166
|
+
|
167
|
+
|
168
|
+
</ul>
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
<h2>
|
175
|
+
Instance Method Summary
|
176
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
177
|
+
</h2>
|
178
|
+
|
179
|
+
<ul class="summary">
|
180
|
+
|
181
|
+
<li class="public ">
|
182
|
+
<span class="summary_signature">
|
183
|
+
|
184
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (Processor) <strong>initialize</strong>(validator) </a>
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
</span>
|
189
|
+
|
190
|
+
|
191
|
+
<span class="note title constructor">constructor</span>
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
<span class="summary_desc"><div class='inline'>
|
201
|
+
<p>A new instance of Processor.</p>
|
202
|
+
</div></span>
|
203
|
+
|
204
|
+
</li>
|
205
|
+
|
206
|
+
|
207
|
+
<li class="public ">
|
208
|
+
<span class="summary_signature">
|
209
|
+
|
210
|
+
<a href="#process-instance_method" title="#process (instance method)">- (Object) <strong>process</strong>(key, options = {}) </a>
|
211
|
+
|
212
|
+
|
213
|
+
|
214
|
+
</span>
|
215
|
+
|
216
|
+
|
217
|
+
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
<span class="summary_desc"><div class='inline'>
|
225
|
+
<p>Default processing method, simply storing the validated key in the filtered
|
226
|
+
hash.</p>
|
227
|
+
</div></span>
|
228
|
+
|
229
|
+
</li>
|
230
|
+
|
231
|
+
|
232
|
+
</ul>
|
233
|
+
|
234
|
+
|
235
|
+
<div id="constructor_details" class="method_details_list">
|
236
|
+
<h2>Constructor Details</h2>
|
237
|
+
|
238
|
+
<div class="method_details first">
|
239
|
+
<h3 class="signature first" id="initialize-instance_method">
|
240
|
+
|
241
|
+
- (<tt><span class='object_link'><a href="" title="Kharon::Processor (class)">Processor</a></span></tt>) <strong>initialize</strong>(validator)
|
242
|
+
|
243
|
+
|
244
|
+
|
245
|
+
|
246
|
+
|
247
|
+
</h3><div class="docstring">
|
248
|
+
<div class="discussion">
|
249
|
+
|
250
|
+
<p>Returns a new instance of Processor</p>
|
251
|
+
|
252
|
+
|
253
|
+
</div>
|
254
|
+
</div>
|
255
|
+
<div class="tags">
|
256
|
+
|
257
|
+
|
258
|
+
</div><table class="source_code">
|
259
|
+
<tr>
|
260
|
+
<td>
|
261
|
+
<pre class="lines">
|
262
|
+
|
263
|
+
|
264
|
+
11
|
265
|
+
12
|
266
|
+
13</pre>
|
267
|
+
</td>
|
268
|
+
<td>
|
269
|
+
<pre class="code"><span class="info file"># File 'lib/kharon/processor.rb', line 11</span>
|
270
|
+
|
271
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_validator'>validator</span><span class='rparen'>)</span>
|
272
|
+
<span class='ivar'>@validator</span> <span class='op'>=</span> <span class='id identifier rubyid_validator'>validator</span>
|
273
|
+
<span class='kw'>end</span></pre>
|
274
|
+
</td>
|
275
|
+
</tr>
|
276
|
+
</table>
|
277
|
+
</div>
|
278
|
+
|
279
|
+
</div>
|
280
|
+
|
281
|
+
<div id="instance_attr_details" class="attr_details">
|
282
|
+
<h2>Instance Attribute Details</h2>
|
283
|
+
|
284
|
+
|
285
|
+
<span id="validator=-instance_method"></span>
|
286
|
+
<div class="method_details first">
|
287
|
+
<h3 class="signature first" id="validator-instance_method">
|
288
|
+
|
289
|
+
- (<tt>Object</tt>) <strong>validator</strong>
|
290
|
+
|
291
|
+
|
292
|
+
|
293
|
+
|
294
|
+
|
295
|
+
</h3><div class="docstring">
|
296
|
+
<div class="discussion">
|
297
|
+
|
298
|
+
<p>Returns the value of attribute validator</p>
|
299
|
+
|
300
|
+
|
301
|
+
</div>
|
302
|
+
</div>
|
303
|
+
<div class="tags">
|
304
|
+
|
305
|
+
|
306
|
+
</div><table class="source_code">
|
307
|
+
<tr>
|
308
|
+
<td>
|
309
|
+
<pre class="lines">
|
310
|
+
|
311
|
+
|
312
|
+
9
|
313
|
+
10
|
314
|
+
11</pre>
|
315
|
+
</td>
|
316
|
+
<td>
|
317
|
+
<pre class="code"><span class="info file"># File 'lib/kharon/processor.rb', line 9</span>
|
318
|
+
|
319
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_validator'>validator</span>
|
320
|
+
<span class='ivar'>@validator</span>
|
321
|
+
<span class='kw'>end</span></pre>
|
322
|
+
</td>
|
323
|
+
</tr>
|
324
|
+
</table>
|
325
|
+
</div>
|
326
|
+
|
327
|
+
</div>
|
328
|
+
|
329
|
+
|
330
|
+
<div id="instance_method_details" class="method_details_list">
|
331
|
+
<h2>Instance Method Details</h2>
|
332
|
+
|
333
|
+
|
334
|
+
<div class="method_details first">
|
335
|
+
<h3 class="signature first" id="process-instance_method">
|
336
|
+
|
337
|
+
- (<tt>Object</tt>) <strong>process</strong>(key, options = {})
|
338
|
+
|
339
|
+
|
340
|
+
|
341
|
+
|
342
|
+
|
343
|
+
</h3><div class="docstring">
|
344
|
+
<div class="discussion">
|
345
|
+
|
346
|
+
<p>Default processing method, simply storing the validated key in the filtered
|
347
|
+
hash.</p>
|
348
|
+
|
349
|
+
|
350
|
+
</div>
|
351
|
+
</div>
|
352
|
+
<div class="tags">
|
353
|
+
<p class="tag_title">Parameters:</p>
|
354
|
+
<ul class="param">
|
355
|
+
|
356
|
+
<li>
|
357
|
+
|
358
|
+
<span class='name'>key</span>
|
359
|
+
|
360
|
+
|
361
|
+
<span class='type'>(<tt>Object</tt>)</span>
|
362
|
+
|
363
|
+
|
364
|
+
|
365
|
+
—
|
366
|
+
<div class='inline'>
|
367
|
+
<p>the key associated with the value currently filteres in the filtered datas.</p>
|
368
|
+
</div>
|
369
|
+
|
370
|
+
</li>
|
371
|
+
|
372
|
+
<li>
|
373
|
+
|
374
|
+
<span class='name'>options</span>
|
375
|
+
|
376
|
+
|
377
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
378
|
+
|
379
|
+
|
380
|
+
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
381
|
+
|
382
|
+
|
383
|
+
—
|
384
|
+
<div class='inline'>
|
385
|
+
<p>the options applied to the initial value.</p>
|
386
|
+
</div>
|
387
|
+
|
388
|
+
</li>
|
389
|
+
|
390
|
+
</ul>
|
391
|
+
|
392
|
+
|
393
|
+
</div><table class="source_code">
|
394
|
+
<tr>
|
395
|
+
<td>
|
396
|
+
<pre class="lines">
|
397
|
+
|
398
|
+
|
399
|
+
18
|
400
|
+
19
|
401
|
+
20</pre>
|
402
|
+
</td>
|
403
|
+
<td>
|
404
|
+
<pre class="code"><span class="info file"># File 'lib/kharon/processor.rb', line 18</span>
|
405
|
+
|
406
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_process'>process</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
407
|
+
<span class='id identifier rubyid_store'>store</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='tlambda'>-></span><span class='lparen'>(</span><span class='id identifier rubyid_item'>item</span><span class='rparen'>)</span><span class='tlambeg'>{</span><span class='id identifier rubyid_item'>item</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
408
|
+
<span class='kw'>end</span></pre>
|
409
|
+
</td>
|
410
|
+
</tr>
|
411
|
+
</table>
|
412
|
+
</div>
|
413
|
+
|
414
|
+
</div>
|
415
|
+
|
416
|
+
</div>
|
417
|
+
|
418
|
+
<div id="footer">
|
419
|
+
Generated on Thu Jun 2 16:20:55 2016 by
|
420
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
421
|
+
0.8.7.6 (ruby-1.9.3).
|
422
|
+
</div>
|
423
|
+
|
424
|
+
</body>
|
425
|
+
</html>
|