csv_decision 0.0.3 → 0.0.4

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 (87) hide show
  1. checksums.yaml +4 -4
  2. data/.codeclimate.yml +2 -0
  3. data/.gitignore +2 -1
  4. data/.travis.yml +2 -3
  5. data/CHANGELOG.md +19 -1
  6. data/README.md +49 -16
  7. data/{benchmark.rb → benchmarks/rufus_decision.rb} +1 -1
  8. data/csv_decision.gemspec +1 -1
  9. data/doc/CSVDecision/CellValidationError.html +143 -0
  10. data/doc/CSVDecision/Columns/Default.html +409 -0
  11. data/doc/CSVDecision/Columns/Dictionary.html +410 -0
  12. data/doc/CSVDecision/Columns/Entry.html +321 -0
  13. data/doc/CSVDecision/Columns.html +476 -0
  14. data/doc/CSVDecision/Constant.html +295 -0
  15. data/doc/CSVDecision/Data.html +344 -0
  16. data/doc/CSVDecision/Decide.html +434 -0
  17. data/doc/CSVDecision/Decision.html +604 -0
  18. data/doc/CSVDecision/Error.html +139 -0
  19. data/doc/CSVDecision/FileError.html +143 -0
  20. data/doc/CSVDecision/Function.html +229 -0
  21. data/doc/CSVDecision/Header.html +520 -0
  22. data/doc/CSVDecision/Input.html +305 -0
  23. data/doc/CSVDecision/Load.html +225 -0
  24. data/doc/CSVDecision/Matchers/Constant.html +242 -0
  25. data/doc/CSVDecision/Matchers/Function.html +342 -0
  26. data/doc/CSVDecision/Matchers/Matcher.html +325 -0
  27. data/doc/CSVDecision/Matchers/Numeric.html +277 -0
  28. data/doc/CSVDecision/Matchers/Pattern.html +600 -0
  29. data/doc/CSVDecision/Matchers/Range.html +413 -0
  30. data/doc/CSVDecision/Matchers/Symbol.html +280 -0
  31. data/doc/CSVDecision/Matchers.html +1529 -0
  32. data/doc/CSVDecision/Numeric.html +259 -0
  33. data/doc/CSVDecision/Options.html +445 -0
  34. data/doc/CSVDecision/Parse.html +270 -0
  35. data/doc/CSVDecision/ScanRow.html +746 -0
  36. data/doc/CSVDecision/Symbol.html +256 -0
  37. data/doc/CSVDecision/Table.html +1115 -0
  38. data/doc/CSVDecision.html +652 -0
  39. data/doc/_index.html +410 -0
  40. data/doc/class_list.html +51 -0
  41. data/doc/css/common.css +1 -0
  42. data/doc/css/full_list.css +58 -0
  43. data/doc/css/style.css +499 -0
  44. data/doc/file.README.html +264 -0
  45. data/doc/file_list.html +56 -0
  46. data/doc/frames.html +17 -0
  47. data/doc/index.html +264 -0
  48. data/doc/js/app.js +248 -0
  49. data/doc/js/full_list.js +216 -0
  50. data/doc/js/jquery.js +4 -0
  51. data/doc/method_list.html +683 -0
  52. data/doc/top-level-namespace.html +110 -0
  53. data/lib/csv_decision/columns.rb +15 -12
  54. data/lib/csv_decision/constant.rb +54 -0
  55. data/lib/csv_decision/decide.rb +5 -5
  56. data/lib/csv_decision/decision.rb +3 -1
  57. data/lib/csv_decision/function.rb +32 -0
  58. data/lib/csv_decision/header.rb +27 -18
  59. data/lib/csv_decision/input.rb +11 -8
  60. data/lib/csv_decision/matchers/constant.rb +18 -0
  61. data/lib/csv_decision/matchers/function.rb +11 -44
  62. data/lib/csv_decision/matchers/numeric.rb +5 -33
  63. data/lib/csv_decision/matchers/pattern.rb +26 -11
  64. data/lib/csv_decision/matchers/range.rb +21 -5
  65. data/lib/csv_decision/matchers/symbol.rb +20 -0
  66. data/lib/csv_decision/matchers.rb +85 -20
  67. data/lib/csv_decision/numeric.rb +38 -0
  68. data/lib/csv_decision/options.rb +36 -27
  69. data/lib/csv_decision/parse.rb +46 -39
  70. data/lib/csv_decision/scan_row.rb +19 -7
  71. data/lib/csv_decision/symbol.rb +73 -0
  72. data/lib/csv_decision/table.rb +24 -18
  73. data/lib/csv_decision.rb +25 -18
  74. data/spec/csv_decision/columns_spec.rb +1 -1
  75. data/spec/csv_decision/constant_spec.rb +60 -0
  76. data/spec/csv_decision/examples_spec.rb +119 -0
  77. data/spec/csv_decision/matchers/function_spec.rb +48 -28
  78. data/spec/csv_decision/matchers/numeric_spec.rb +4 -41
  79. data/spec/csv_decision/matchers/range_spec.rb +31 -61
  80. data/spec/csv_decision/matchers/symbol_spec.rb +65 -0
  81. data/spec/csv_decision/options_spec.rb +14 -2
  82. data/spec/csv_decision/parse_spec.rb +10 -0
  83. data/spec/csv_decision/table_spec.rb +112 -6
  84. data/spec/data/valid/simple_constants.csv +3 -3
  85. metadata +62 -7
  86. data/spec/csv_decision/simple_example_spec.rb +0 -75
  87. /data/spec/{csv_decision.rb → csv_decision_spec.rb} +0 -0
@@ -0,0 +1,410 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Class: CSVDecision::Columns::Dictionary
8
+
9
+ &mdash; Documentation by YARD 0.9.12
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
+ pathId = "CSVDecision::Columns::Dictionary";
19
+ relpath = '../../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../../_index.html">Index (D)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../../CSVDecision.html" title="CSVDecision (module)">CSVDecision</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Columns.html" title="CSVDecision::Columns (class)">Columns</a></span></span>
41
+ &raquo;
42
+ <span class="title">Dictionary</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Class: CSVDecision::Columns::Dictionary
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName">Object</span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next">CSVDecision::Columns::Dictionary</li>
78
+
79
+ </ul>
80
+ <a href="#" class="inheritanceTree">show all</a>
81
+
82
+ </dd>
83
+ </dl>
84
+
85
+
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+ <dl>
96
+ <dt>Defined in:</dt>
97
+ <dd>lib/csv_decision/columns.rb</dd>
98
+ </dl>
99
+
100
+ </div>
101
+
102
+ <h2>Overview</h2><div class="docstring">
103
+ <div class="discussion">
104
+
105
+ <p>Dictionary of all data columns. The key of each hash is the header
106
+ cell&#39;s array column index. Note that input and output columns can be
107
+ interspersed and need not have unique names.</p>
108
+
109
+
110
+ </div>
111
+ </div>
112
+ <div class="tags">
113
+
114
+
115
+ </div>
116
+
117
+
118
+
119
+ <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
120
+ <ul class="summary">
121
+
122
+ <li class="public ">
123
+ <span class="summary_signature">
124
+
125
+ <a href="#ins-instance_method" title="#ins (instance method)">#<strong>ins</strong> &#x21d2; Hash{Integer=&gt;Entry} </a>
126
+
127
+
128
+
129
+ </span>
130
+
131
+
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+
142
+ <span class="summary_desc"><div class='inline'>
143
+ <p>Input columns.</p>
144
+ </div></span>
145
+
146
+ </li>
147
+
148
+
149
+ <li class="public ">
150
+ <span class="summary_signature">
151
+
152
+ <a href="#outs-instance_method" title="#outs (instance method)">#<strong>outs</strong> &#x21d2; Hash{Integer=&gt;Entry} </a>
153
+
154
+
155
+
156
+ </span>
157
+
158
+
159
+
160
+
161
+
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+ <span class="summary_desc"><div class='inline'>
170
+ <p>Output columns.</p>
171
+ </div></span>
172
+
173
+ </li>
174
+
175
+
176
+ </ul>
177
+
178
+
179
+
180
+
181
+
182
+ <h2>
183
+ Instance Method Summary
184
+ <small><a href="#" class="summary_toggle">collapse</a></small>
185
+ </h2>
186
+
187
+ <ul class="summary">
188
+
189
+ <li class="public ">
190
+ <span class="summary_signature">
191
+
192
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong> &#x21d2; Dictionary </a>
193
+
194
+
195
+
196
+ </span>
197
+
198
+
199
+ <span class="note title constructor">constructor</span>
200
+
201
+
202
+
203
+
204
+
205
+
206
+
207
+
208
+ <span class="summary_desc"><div class='inline'>
209
+ <p>TODO: Input columns with a default value (planned feature) attr_accessor
210
+ :defaults.</p>
211
+ </div></span>
212
+
213
+ </li>
214
+
215
+
216
+ </ul>
217
+
218
+
219
+ <div id="constructor_details" class="method_details_list">
220
+ <h2>Constructor Details</h2>
221
+
222
+ <div class="method_details first">
223
+ <h3 class="signature first" id="initialize-instance_method">
224
+
225
+ #<strong>initialize</strong> &#x21d2; <tt><span class='object_link'><a href="" title="CSVDecision::Columns::Dictionary (class)">Dictionary</a></span></tt>
226
+
227
+
228
+
229
+
230
+
231
+ </h3><div class="docstring">
232
+ <div class="discussion">
233
+
234
+ <p>TODO: Input columns with a default value (planned feature) attr_accessor
235
+ :defaults</p>
236
+
237
+
238
+ </div>
239
+ </div>
240
+ <div class="tags">
241
+
242
+
243
+ </div><table class="source_code">
244
+ <tr>
245
+ <td>
246
+ <pre class="lines">
247
+
248
+
249
+ 33
250
+ 34
251
+ 35
252
+ 36
253
+ 37
254
+ 38</pre>
255
+ </td>
256
+ <td>
257
+ <pre class="code"><span class="info file"># File 'lib/csv_decision/columns.rb', line 33</span>
258
+
259
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
260
+ <span class='ivar'>@ins</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
261
+ <span class='ivar'>@outs</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
262
+ <span class='comment'># TODO: @path = {}
263
+ </span> <span class='comment'># TODO: @defaults = {}
264
+ </span><span class='kw'>end</span></pre>
265
+ </td>
266
+ </tr>
267
+ </table>
268
+ </div>
269
+
270
+ </div>
271
+
272
+ <div id="instance_attr_details" class="attr_details">
273
+ <h2>Instance Attribute Details</h2>
274
+
275
+
276
+ <span id="ins=-instance_method"></span>
277
+ <div class="method_details first">
278
+ <h3 class="signature first" id="ins-instance_method">
279
+
280
+ #<strong>ins</strong> &#x21d2; <tt>Hash{Integer=&gt;<span class='object_link'><a href="Entry.html" title="CSVDecision::Columns::Entry (class)">Entry</a></span>}</tt>
281
+
282
+
283
+
284
+
285
+
286
+ </h3><div class="docstring">
287
+ <div class="discussion">
288
+
289
+ <p>Input columns.</p>
290
+
291
+
292
+ </div>
293
+ </div>
294
+ <div class="tags">
295
+
296
+ <p class="tag_title">Returns:</p>
297
+ <ul class="return">
298
+
299
+ <li>
300
+
301
+
302
+ <span class='type'>(<tt>Hash{Integer=&gt;<span class='object_link'><a href="Entry.html" title="CSVDecision::Columns::Entry (class)">Entry</a></span>}</tt>)</span>
303
+
304
+
305
+
306
+ &mdash;
307
+ <div class='inline'>
308
+ <p>All input column dictionary entries.</p>
309
+ </div>
310
+
311
+ </li>
312
+
313
+ </ul>
314
+
315
+ </div><table class="source_code">
316
+ <tr>
317
+ <td>
318
+ <pre class="lines">
319
+
320
+
321
+ 21
322
+ 22
323
+ 23</pre>
324
+ </td>
325
+ <td>
326
+ <pre class="code"><span class="info file"># File 'lib/csv_decision/columns.rb', line 21</span>
327
+
328
+ <span class='kw'>def</span> <span class='id identifier rubyid_ins'>ins</span>
329
+ <span class='ivar'>@ins</span>
330
+ <span class='kw'>end</span></pre>
331
+ </td>
332
+ </tr>
333
+ </table>
334
+ </div>
335
+
336
+
337
+ <span id="outs=-instance_method"></span>
338
+ <div class="method_details ">
339
+ <h3 class="signature " id="outs-instance_method">
340
+
341
+ #<strong>outs</strong> &#x21d2; <tt>Hash{Integer=&gt;<span class='object_link'><a href="Entry.html" title="CSVDecision::Columns::Entry (class)">Entry</a></span>}</tt>
342
+
343
+
344
+
345
+
346
+
347
+ </h3><div class="docstring">
348
+ <div class="discussion">
349
+
350
+ <p>Output columns.</p>
351
+
352
+
353
+ </div>
354
+ </div>
355
+ <div class="tags">
356
+
357
+ <p class="tag_title">Returns:</p>
358
+ <ul class="return">
359
+
360
+ <li>
361
+
362
+
363
+ <span class='type'>(<tt>Hash{Integer=&gt;<span class='object_link'><a href="Entry.html" title="CSVDecision::Columns::Entry (class)">Entry</a></span>}</tt>)</span>
364
+
365
+
366
+
367
+ &mdash;
368
+ <div class='inline'>
369
+ <p>All output column dictionary entries.</p>
370
+ </div>
371
+
372
+ </li>
373
+
374
+ </ul>
375
+
376
+ </div><table class="source_code">
377
+ <tr>
378
+ <td>
379
+ <pre class="lines">
380
+
381
+
382
+ 25
383
+ 26
384
+ 27</pre>
385
+ </td>
386
+ <td>
387
+ <pre class="code"><span class="info file"># File 'lib/csv_decision/columns.rb', line 25</span>
388
+
389
+ <span class='kw'>def</span> <span class='id identifier rubyid_outs'>outs</span>
390
+ <span class='ivar'>@outs</span>
391
+ <span class='kw'>end</span></pre>
392
+ </td>
393
+ </tr>
394
+ </table>
395
+ </div>
396
+
397
+ </div>
398
+
399
+
400
+ </div>
401
+
402
+ <div id="footer">
403
+ Generated on Tue Dec 26 18:31:38 2017 by
404
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
405
+ 0.9.12 (ruby-2.3.0).
406
+ </div>
407
+
408
+ </div>
409
+ </body>
410
+ </html>