csv_decision 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +3 -0
- data/CHANGELOG.md +4 -0
- data/README.md +62 -28
- data/csv_decision.gemspec +1 -1
- data/doc/CSVDecision/CellValidationError.html +2 -2
- data/doc/CSVDecision/Columns/Dictionary.html +114 -20
- data/doc/CSVDecision/Columns/Entry.html +2 -2
- data/doc/CSVDecision/Columns.html +109 -27
- data/doc/CSVDecision/Data.html +2 -2
- data/doc/CSVDecision/Decide.html +2 -2
- data/doc/CSVDecision/Decision.html +21 -21
- data/doc/CSVDecision/Dictionary/Entry.html +508 -0
- data/doc/CSVDecision/Dictionary.html +265 -0
- data/doc/CSVDecision/Error.html +2 -2
- data/doc/CSVDecision/FileError.html +3 -3
- data/doc/CSVDecision/Header.html +37 -136
- data/doc/CSVDecision/Input.html +2 -2
- data/doc/CSVDecision/Load.html +2 -2
- data/doc/CSVDecision/Matchers/Constant.html +2 -2
- data/doc/CSVDecision/Matchers/Function.html +2 -2
- data/doc/CSVDecision/Matchers/Guard.html +92 -25
- data/doc/CSVDecision/Matchers/Matcher.html +14 -18
- data/doc/CSVDecision/Matchers/Numeric.html +2 -2
- data/doc/CSVDecision/Matchers/Pattern.html +2 -2
- data/doc/CSVDecision/Matchers/Range.html +2 -2
- data/doc/CSVDecision/Matchers/Symbol.html +2 -2
- data/doc/CSVDecision/Matchers.html +5 -5
- data/doc/CSVDecision/Options.html +2 -2
- data/doc/CSVDecision/Parse.html +6 -4
- data/doc/CSVDecision/Result.html +944 -0
- data/doc/CSVDecision/ScanRow.html +70 -80
- data/doc/CSVDecision/Table.html +134 -54
- data/doc/CSVDecision.html +5 -5
- data/doc/_index.html +18 -4
- data/doc/class_list.html +1 -1
- data/doc/file.README.html +132 -62
- data/doc/index.html +132 -62
- data/doc/method_list.html +156 -60
- data/doc/top-level-namespace.html +2 -2
- data/lib/csv_decision/columns.rb +1 -8
- data/lib/csv_decision/decision.rb +45 -96
- data/lib/csv_decision/dictionary.rb +149 -0
- data/lib/csv_decision/header.rb +6 -133
- data/lib/csv_decision/matchers.rb +1 -2
- data/lib/csv_decision/parse.rb +18 -7
- data/lib/csv_decision/result.rb +180 -0
- data/lib/csv_decision/scan_row.rb +13 -7
- data/lib/csv_decision/table.rb +6 -5
- data/lib/csv_decision.rb +3 -1
- data/spec/csv_decision/columns_spec.rb +25 -4
- data/spec/csv_decision/examples_spec.rb +25 -0
- data/spec/csv_decision/matchers/guard_spec.rb +26 -9
- data/spec/csv_decision/table_spec.rb +48 -2
- metadata +7 -2
data/doc/method_list.html
CHANGED
@@ -44,6 +44,38 @@
|
|
44
44
|
<ul id="full_list" class="method">
|
45
45
|
|
46
46
|
|
47
|
+
<li class="odd ">
|
48
|
+
<div class="item">
|
49
|
+
<span class='object_link'><a href="CSVDecision/Result.html#accumulate_outs-instance_method" title="CSVDecision::Result#accumulate_outs (method)">#accumulate_outs</a></span>
|
50
|
+
<small>CSVDecision::Result</small>
|
51
|
+
</div>
|
52
|
+
</li>
|
53
|
+
|
54
|
+
|
55
|
+
<li class="even ">
|
56
|
+
<div class="item">
|
57
|
+
<span class='object_link'><a href="CSVDecision/Result.html#add_outs-instance_method" title="CSVDecision::Result#add_outs (method)">#add_outs</a></span>
|
58
|
+
<small>CSVDecision::Result</small>
|
59
|
+
</div>
|
60
|
+
</li>
|
61
|
+
|
62
|
+
|
63
|
+
<li class="odd ">
|
64
|
+
<div class="item">
|
65
|
+
<span class='object_link'><a href="CSVDecision/Result.html#attributes-instance_method" title="CSVDecision::Result#attributes (method)">#attributes</a></span>
|
66
|
+
<small>CSVDecision::Result</small>
|
67
|
+
</div>
|
68
|
+
</li>
|
69
|
+
|
70
|
+
|
71
|
+
<li class="even ">
|
72
|
+
<div class="item">
|
73
|
+
<span class='object_link'><a href="CSVDecision/Dictionary.html#build-class_method" title="CSVDecision::Dictionary.build (method)">build</a></span>
|
74
|
+
<small>CSVDecision::Dictionary</small>
|
75
|
+
</div>
|
76
|
+
</li>
|
77
|
+
|
78
|
+
|
47
79
|
<li class="odd ">
|
48
80
|
<div class="item">
|
49
81
|
<span class='object_link'><a href="CSVDecision/Table.html#columns-instance_method" title="CSVDecision::Table#columns (method)">#columns</a></span>
|
@@ -62,16 +94,16 @@
|
|
62
94
|
|
63
95
|
<li class="odd ">
|
64
96
|
<div class="item">
|
65
|
-
<span class='object_link'><a href="CSVDecision/
|
66
|
-
<small>CSVDecision::
|
97
|
+
<span class='object_link'><a href="CSVDecision/Table.html#decide-instance_method" title="CSVDecision::Table#decide (method)">#decide</a></span>
|
98
|
+
<small>CSVDecision::Table</small>
|
67
99
|
</div>
|
68
100
|
</li>
|
69
101
|
|
70
102
|
|
71
103
|
<li class="even ">
|
72
104
|
<div class="item">
|
73
|
-
<span class='object_link'><a href="CSVDecision/
|
74
|
-
<small>CSVDecision::
|
105
|
+
<span class='object_link'><a href="CSVDecision/Decide.html#decide-class_method" title="CSVDecision::Decide.decide (method)">decide</a></span>
|
106
|
+
<small>CSVDecision::Decide</small>
|
75
107
|
</div>
|
76
108
|
</li>
|
77
109
|
|
@@ -86,32 +118,32 @@
|
|
86
118
|
|
87
119
|
<li class="even ">
|
88
120
|
<div class="item">
|
89
|
-
<span class='object_link'><a href="CSVDecision/
|
90
|
-
<small>CSVDecision::
|
121
|
+
<span class='object_link'><a href="CSVDecision/Columns.html#dictionary-instance_method" title="CSVDecision::Columns#dictionary (method)">#dictionary</a></span>
|
122
|
+
<small>CSVDecision::Columns</small>
|
91
123
|
</div>
|
92
124
|
</li>
|
93
125
|
|
94
126
|
|
95
127
|
<li class="odd ">
|
96
128
|
<div class="item">
|
97
|
-
<span class='object_link'><a href="CSVDecision/
|
98
|
-
<small>CSVDecision::
|
129
|
+
<span class='object_link'><a href="CSVDecision/Table.html#each-instance_method" title="CSVDecision::Table#each (method)">#each</a></span>
|
130
|
+
<small>CSVDecision::Table</small>
|
99
131
|
</div>
|
100
132
|
</li>
|
101
133
|
|
102
134
|
|
103
135
|
<li class="even ">
|
104
136
|
<div class="item">
|
105
|
-
<span class='object_link'><a href="CSVDecision/
|
106
|
-
<small>CSVDecision::
|
137
|
+
<span class='object_link'><a href="CSVDecision/Dictionary/Entry.html#eval-instance_method" title="CSVDecision::Dictionary::Entry#eval (method)">#eval</a></span>
|
138
|
+
<small>CSVDecision::Dictionary::Entry</small>
|
107
139
|
</div>
|
108
140
|
</li>
|
109
141
|
|
110
142
|
|
111
143
|
<li class="odd ">
|
112
144
|
<div class="item">
|
113
|
-
<span class='object_link'><a href="CSVDecision/
|
114
|
-
<small>CSVDecision::
|
145
|
+
<span class='object_link'><a href="CSVDecision/Result.html#eval_cell_proc-instance_method" title="CSVDecision::Result#eval_cell_proc (method)">#eval_cell_proc</a></span>
|
146
|
+
<small>CSVDecision::Result</small>
|
115
147
|
</div>
|
116
148
|
</li>
|
117
149
|
|
@@ -125,6 +157,14 @@
|
|
125
157
|
|
126
158
|
|
127
159
|
<li class="odd ">
|
160
|
+
<div class="item">
|
161
|
+
<span class='object_link'><a href="CSVDecision/Result.html#eval_outs-instance_method" title="CSVDecision::Result#eval_outs (method)">#eval_outs</a></span>
|
162
|
+
<small>CSVDecision::Result</small>
|
163
|
+
</div>
|
164
|
+
</li>
|
165
|
+
|
166
|
+
|
167
|
+
<li class="even ">
|
128
168
|
<div class="item">
|
129
169
|
<span class='object_link'><a href="CSVDecision/Table.html#file-instance_method" title="CSVDecision::Table#file (method)">#file</a></span>
|
130
170
|
<small>CSVDecision::Table</small>
|
@@ -132,6 +172,14 @@
|
|
132
172
|
</li>
|
133
173
|
|
134
174
|
|
175
|
+
<li class="odd ">
|
176
|
+
<div class="item">
|
177
|
+
<span class='object_link'><a href="CSVDecision/Result.html#final-instance_method" title="CSVDecision::Result#final (method)">#final</a></span>
|
178
|
+
<small>CSVDecision::Result</small>
|
179
|
+
</div>
|
180
|
+
</li>
|
181
|
+
|
182
|
+
|
135
183
|
<li class="even ">
|
136
184
|
<div class="item">
|
137
185
|
<span class='object_link'><a href="CSVDecision/Options.html#from_csv-class_method" title="CSVDecision::Options.from_csv (method)">from_csv</a></span>
|
@@ -142,37 +190,45 @@
|
|
142
190
|
|
143
191
|
<li class="odd ">
|
144
192
|
<div class="item">
|
145
|
-
<span class='object_link'><a href="CSVDecision/
|
146
|
-
<small>CSVDecision::
|
193
|
+
<span class='object_link'><a href="CSVDecision/Table.html#if_rows-instance_method" title="CSVDecision::Table#if_rows (method)">#if_rows</a></span>
|
194
|
+
<small>CSVDecision::Table</small>
|
147
195
|
</div>
|
148
196
|
</li>
|
149
197
|
|
150
198
|
|
151
199
|
<li class="even ">
|
152
200
|
<div class="item">
|
153
|
-
<span class='object_link'><a href="CSVDecision/Columns
|
154
|
-
<small>CSVDecision::Columns
|
201
|
+
<span class='object_link'><a href="CSVDecision/Columns.html#ifs-instance_method" title="CSVDecision::Columns#ifs (method)">#ifs</a></span>
|
202
|
+
<small>CSVDecision::Columns</small>
|
155
203
|
</div>
|
156
204
|
</li>
|
157
205
|
|
158
206
|
|
159
207
|
<li class="odd ">
|
160
208
|
<div class="item">
|
161
|
-
<span class='object_link'><a href="CSVDecision/
|
162
|
-
<small>CSVDecision::
|
209
|
+
<span class='object_link'><a href="CSVDecision/Columns/Dictionary.html#ifs-instance_method" title="CSVDecision::Columns::Dictionary#ifs (method)">#ifs</a></span>
|
210
|
+
<small>CSVDecision::Columns::Dictionary</small>
|
163
211
|
</div>
|
164
212
|
</li>
|
165
213
|
|
166
214
|
|
167
215
|
<li class="even ">
|
168
216
|
<div class="item">
|
169
|
-
<span class='object_link'><a href="CSVDecision/
|
170
|
-
<small>CSVDecision::
|
217
|
+
<span class='object_link'><a href="CSVDecision/Matchers/Function.html#initialize-instance_method" title="CSVDecision::Matchers::Function#initialize (method)">#initialize</a></span>
|
218
|
+
<small>CSVDecision::Matchers::Function</small>
|
171
219
|
</div>
|
172
220
|
</li>
|
173
221
|
|
174
222
|
|
175
223
|
<li class="odd ">
|
224
|
+
<div class="item">
|
225
|
+
<span class='object_link'><a href="CSVDecision/Matchers/Matcher.html#initialize-instance_method" title="CSVDecision::Matchers::Matcher#initialize (method)">#initialize</a></span>
|
226
|
+
<small>CSVDecision::Matchers::Matcher</small>
|
227
|
+
</div>
|
228
|
+
</li>
|
229
|
+
|
230
|
+
|
231
|
+
<li class="even ">
|
176
232
|
<div class="item">
|
177
233
|
<span class='object_link'><a href="CSVDecision/Matchers.html#initialize-instance_method" title="CSVDecision::Matchers#initialize (method)">#initialize</a></span>
|
178
234
|
<small>CSVDecision::Matchers</small>
|
@@ -180,18 +236,26 @@
|
|
180
236
|
</li>
|
181
237
|
|
182
238
|
|
239
|
+
<li class="odd ">
|
240
|
+
<div class="item">
|
241
|
+
<span class='object_link'><a href="CSVDecision/ScanRow.html#initialize-instance_method" title="CSVDecision::ScanRow#initialize (method)">#initialize</a></span>
|
242
|
+
<small>CSVDecision::ScanRow</small>
|
243
|
+
</div>
|
244
|
+
</li>
|
245
|
+
|
246
|
+
|
183
247
|
<li class="even ">
|
184
248
|
<div class="item">
|
185
|
-
<span class='object_link'><a href="CSVDecision/
|
186
|
-
<small>CSVDecision::
|
249
|
+
<span class='object_link'><a href="CSVDecision/Result.html#initialize-instance_method" title="CSVDecision::Result#initialize (method)">#initialize</a></span>
|
250
|
+
<small>CSVDecision::Result</small>
|
187
251
|
</div>
|
188
252
|
</li>
|
189
253
|
|
190
254
|
|
191
255
|
<li class="odd ">
|
192
256
|
<div class="item">
|
193
|
-
<span class='object_link'><a href="CSVDecision/Matchers/
|
194
|
-
<small>CSVDecision::Matchers::
|
257
|
+
<span class='object_link'><a href="CSVDecision/Matchers/Pattern.html#initialize-instance_method" title="CSVDecision::Matchers::Pattern#initialize (method)">#initialize</a></span>
|
258
|
+
<small>CSVDecision::Matchers::Pattern</small>
|
195
259
|
</div>
|
196
260
|
</li>
|
197
261
|
|
@@ -214,24 +278,24 @@
|
|
214
278
|
|
215
279
|
<li class="even ">
|
216
280
|
<div class="item">
|
217
|
-
<span class='object_link'><a href="CSVDecision/
|
218
|
-
<small>CSVDecision::
|
281
|
+
<span class='object_link'><a href="CSVDecision/Columns/Dictionary.html#initialize-instance_method" title="CSVDecision::Columns::Dictionary#initialize (method)">#initialize</a></span>
|
282
|
+
<small>CSVDecision::Columns::Dictionary</small>
|
219
283
|
</div>
|
220
284
|
</li>
|
221
285
|
|
222
286
|
|
223
287
|
<li class="odd ">
|
224
288
|
<div class="item">
|
225
|
-
<span class='object_link'><a href="CSVDecision/
|
226
|
-
<small>CSVDecision::
|
289
|
+
<span class='object_link'><a href="CSVDecision/Table.html#initialize-instance_method" title="CSVDecision::Table#initialize (method)">#initialize</a></span>
|
290
|
+
<small>CSVDecision::Table</small>
|
227
291
|
</div>
|
228
292
|
</li>
|
229
293
|
|
230
294
|
|
231
295
|
<li class="even ">
|
232
296
|
<div class="item">
|
233
|
-
<span class='object_link'><a href="CSVDecision/
|
234
|
-
<small>CSVDecision::
|
297
|
+
<span class='object_link'><a href="CSVDecision/Data.html#input_file%3F-class_method" title="CSVDecision::Data.input_file? (method)">input_file?</a></span>
|
298
|
+
<small>CSVDecision::Data</small>
|
235
299
|
</div>
|
236
300
|
</li>
|
237
301
|
|
@@ -246,8 +310,24 @@
|
|
246
310
|
|
247
311
|
<li class="even ">
|
248
312
|
<div class="item">
|
249
|
-
<span class='object_link'><a href="CSVDecision/Columns
|
250
|
-
<small>CSVDecision::Columns
|
313
|
+
<span class='object_link'><a href="CSVDecision/Columns.html#ins-instance_method" title="CSVDecision::Columns#ins (method)">#ins</a></span>
|
314
|
+
<small>CSVDecision::Columns</small>
|
315
|
+
</div>
|
316
|
+
</li>
|
317
|
+
|
318
|
+
|
319
|
+
<li class="odd ">
|
320
|
+
<div class="item">
|
321
|
+
<span class='object_link'><a href="CSVDecision/Columns/Dictionary.html#ins-instance_method" title="CSVDecision::Columns::Dictionary#ins (method)">#ins</a></span>
|
322
|
+
<small>CSVDecision::Columns::Dictionary</small>
|
323
|
+
</div>
|
324
|
+
</li>
|
325
|
+
|
326
|
+
|
327
|
+
<li class="even ">
|
328
|
+
<div class="item">
|
329
|
+
<span class='object_link'><a href="CSVDecision/Dictionary/Entry.html#ins%3F-instance_method" title="CSVDecision::Dictionary::Entry#ins? (method)">#ins?</a></span>
|
330
|
+
<small>CSVDecision::Dictionary::Entry</small>
|
251
331
|
</div>
|
252
332
|
</li>
|
253
333
|
|
@@ -414,13 +494,21 @@
|
|
414
494
|
|
415
495
|
<li class="odd ">
|
416
496
|
<div class="item">
|
417
|
-
<span class='object_link'><a href="CSVDecision/
|
418
|
-
<small>CSVDecision::
|
497
|
+
<span class='object_link'><a href="CSVDecision/Result.html#multi_result-instance_method" title="CSVDecision::Result#multi_result (method)">#multi_result</a></span>
|
498
|
+
<small>CSVDecision::Result</small>
|
419
499
|
</div>
|
420
500
|
</li>
|
421
501
|
|
422
502
|
|
423
503
|
<li class="even ">
|
504
|
+
<div class="item">
|
505
|
+
<span class='object_link'><a href="CSVDecision/Dictionary/Entry.html#name-instance_method" title="CSVDecision::Dictionary::Entry#name (method)">#name</a></span>
|
506
|
+
<small>CSVDecision::Dictionary::Entry</small>
|
507
|
+
</div>
|
508
|
+
</li>
|
509
|
+
|
510
|
+
|
511
|
+
<li class="odd ">
|
424
512
|
<div class="item">
|
425
513
|
<span class='object_link'><a href="CSVDecision/Options.html#normalize-class_method" title="CSVDecision::Options.normalize (method)">normalize</a></span>
|
426
514
|
<small>CSVDecision::Options</small>
|
@@ -428,7 +516,7 @@
|
|
428
516
|
</li>
|
429
517
|
|
430
518
|
|
431
|
-
<li class="
|
519
|
+
<li class="even ">
|
432
520
|
<div class="item">
|
433
521
|
<span class='object_link'><a href="CSVDecision/Matchers.html#normalize_operator-class_method" title="CSVDecision::Matchers.normalize_operator (method)">normalize_operator</a></span>
|
434
522
|
<small>CSVDecision::Matchers</small>
|
@@ -436,7 +524,7 @@
|
|
436
524
|
</li>
|
437
525
|
|
438
526
|
|
439
|
-
<li class="
|
527
|
+
<li class="odd ">
|
440
528
|
<div class="item">
|
441
529
|
<span class='object_link'><a href="CSVDecision/Matchers.html#numeric-class_method" title="CSVDecision::Matchers.numeric (method)">numeric</a></span>
|
442
530
|
<small>CSVDecision::Matchers</small>
|
@@ -444,7 +532,7 @@
|
|
444
532
|
</li>
|
445
533
|
|
446
534
|
|
447
|
-
<li class="
|
535
|
+
<li class="even ">
|
448
536
|
<div class="item">
|
449
537
|
<span class='object_link'><a href="CSVDecision/Matchers.html#numeric%3F-class_method" title="CSVDecision::Matchers.numeric? (method)">numeric?</a></span>
|
450
538
|
<small>CSVDecision::Matchers</small>
|
@@ -452,7 +540,7 @@
|
|
452
540
|
</li>
|
453
541
|
|
454
542
|
|
455
|
-
<li class="
|
543
|
+
<li class="odd ">
|
456
544
|
<div class="item">
|
457
545
|
<span class='object_link'><a href="CSVDecision/Table.html#options-instance_method" title="CSVDecision::Table#options (method)">#options</a></span>
|
458
546
|
<small>CSVDecision::Table</small>
|
@@ -460,7 +548,7 @@
|
|
460
548
|
</li>
|
461
549
|
|
462
550
|
|
463
|
-
<li class="
|
551
|
+
<li class="even ">
|
464
552
|
<div class="item">
|
465
553
|
<span class='object_link'><a href="CSVDecision/Columns.html#outs-instance_method" title="CSVDecision::Columns#outs (method)">#outs</a></span>
|
466
554
|
<small>CSVDecision::Columns</small>
|
@@ -468,7 +556,7 @@
|
|
468
556
|
</li>
|
469
557
|
|
470
558
|
|
471
|
-
<li class="
|
559
|
+
<li class="odd ">
|
472
560
|
<div class="item">
|
473
561
|
<span class='object_link'><a href="CSVDecision/Matchers.html#outs-instance_method" title="CSVDecision::Matchers#outs (method)">#outs</a></span>
|
474
562
|
<small>CSVDecision::Matchers</small>
|
@@ -476,7 +564,7 @@
|
|
476
564
|
</li>
|
477
565
|
|
478
566
|
|
479
|
-
<li class="
|
567
|
+
<li class="even ">
|
480
568
|
<div class="item">
|
481
569
|
<span class='object_link'><a href="CSVDecision/Columns/Dictionary.html#outs-instance_method" title="CSVDecision::Columns::Dictionary#outs (method)">#outs</a></span>
|
482
570
|
<small>CSVDecision::Columns::Dictionary</small>
|
@@ -484,23 +572,23 @@
|
|
484
572
|
</li>
|
485
573
|
|
486
574
|
|
487
|
-
<li class="
|
575
|
+
<li class="odd ">
|
488
576
|
<div class="item">
|
489
|
-
<span class='object_link'><a href="CSVDecision/Matchers/
|
490
|
-
<small>CSVDecision::Matchers::
|
577
|
+
<span class='object_link'><a href="CSVDecision/Matchers/Guard.html#outs%3F-instance_method" title="CSVDecision::Matchers::Guard#outs? (method)">#outs?</a></span>
|
578
|
+
<small>CSVDecision::Matchers::Guard</small>
|
491
579
|
</div>
|
492
580
|
</li>
|
493
581
|
|
494
582
|
|
495
|
-
<li class="
|
583
|
+
<li class="even ">
|
496
584
|
<div class="item">
|
497
|
-
<span class='object_link'><a href="CSVDecision/Matchers/
|
498
|
-
<small>CSVDecision::Matchers::
|
585
|
+
<span class='object_link'><a href="CSVDecision/Matchers/Matcher.html#outs%3F-instance_method" title="CSVDecision::Matchers::Matcher#outs? (method)">#outs?</a></span>
|
586
|
+
<small>CSVDecision::Matchers::Matcher</small>
|
499
587
|
</div>
|
500
588
|
</li>
|
501
589
|
|
502
590
|
|
503
|
-
<li class="
|
591
|
+
<li class="odd ">
|
504
592
|
<div class="item">
|
505
593
|
<span class='object_link'><a href="CSVDecision/Matchers/Constant.html#outs%3F-instance_method" title="CSVDecision::Matchers::Constant#outs? (method)">#outs?</a></span>
|
506
594
|
<small>CSVDecision::Matchers::Constant</small>
|
@@ -508,7 +596,7 @@
|
|
508
596
|
</li>
|
509
597
|
|
510
598
|
|
511
|
-
<li class="
|
599
|
+
<li class="even ">
|
512
600
|
<div class="item">
|
513
601
|
<span class='object_link'><a href="CSVDecision/Table.html#outs_functions-instance_method" title="CSVDecision::Table#outs_functions (method)">#outs_functions</a></span>
|
514
602
|
<small>CSVDecision::Table</small>
|
@@ -516,7 +604,7 @@
|
|
516
604
|
</li>
|
517
605
|
|
518
606
|
|
519
|
-
<li class="
|
607
|
+
<li class="odd ">
|
520
608
|
<div class="item">
|
521
609
|
<span class='object_link'><a href="CSVDecision/Table.html#outs_rows-instance_method" title="CSVDecision::Table#outs_rows (method)">#outs_rows</a></span>
|
522
610
|
<small>CSVDecision::Table</small>
|
@@ -524,7 +612,7 @@
|
|
524
612
|
</li>
|
525
613
|
|
526
614
|
|
527
|
-
<li class="
|
615
|
+
<li class="even ">
|
528
616
|
<div class="item">
|
529
617
|
<span class='object_link'><a href="CSVDecision/Matchers.html#parse-class_method" title="CSVDecision::Matchers.parse (method)">parse</a></span>
|
530
618
|
<small>CSVDecision::Matchers</small>
|
@@ -532,7 +620,7 @@
|
|
532
620
|
</li>
|
533
621
|
|
534
622
|
|
535
|
-
<li class="
|
623
|
+
<li class="odd ">
|
536
624
|
<div class="item">
|
537
625
|
<span class='object_link'><a href="CSVDecision.html#parse-class_method" title="CSVDecision.parse (method)">parse</a></span>
|
538
626
|
<small>CSVDecision</small>
|
@@ -540,7 +628,7 @@
|
|
540
628
|
</li>
|
541
629
|
|
542
630
|
|
543
|
-
<li class="
|
631
|
+
<li class="even ">
|
544
632
|
<div class="item">
|
545
633
|
<span class='object_link'><a href="CSVDecision/Input.html#parse-class_method" title="CSVDecision::Input.parse (method)">parse</a></span>
|
546
634
|
<small>CSVDecision::Input</small>
|
@@ -548,7 +636,7 @@
|
|
548
636
|
</li>
|
549
637
|
|
550
638
|
|
551
|
-
<li class="
|
639
|
+
<li class="odd ">
|
552
640
|
<div class="item">
|
553
641
|
<span class='object_link'><a href="CSVDecision/Matchers.html#parse_ins-instance_method" title="CSVDecision::Matchers#parse_ins (method)">#parse_ins</a></span>
|
554
642
|
<small>CSVDecision::Matchers</small>
|
@@ -556,7 +644,7 @@
|
|
556
644
|
</li>
|
557
645
|
|
558
646
|
|
559
|
-
<li class="
|
647
|
+
<li class="even ">
|
560
648
|
<div class="item">
|
561
649
|
<span class='object_link'><a href="CSVDecision/Matchers.html#parse_outs-instance_method" title="CSVDecision::Matchers#parse_outs (method)">#parse_outs</a></span>
|
562
650
|
<small>CSVDecision::Matchers</small>
|
@@ -564,7 +652,7 @@
|
|
564
652
|
</li>
|
565
653
|
|
566
654
|
|
567
|
-
<li class="
|
655
|
+
<li class="odd ">
|
568
656
|
<div class="item">
|
569
657
|
<span class='object_link'><a href="CSVDecision/Load.html#path-class_method" title="CSVDecision::Load.path (method)">path</a></span>
|
570
658
|
<small>CSVDecision::Load</small>
|
@@ -572,7 +660,7 @@
|
|
572
660
|
</li>
|
573
661
|
|
574
662
|
|
575
|
-
<li class="
|
663
|
+
<li class="even ">
|
576
664
|
<div class="item">
|
577
665
|
<span class='object_link'><a href="CSVDecision/ScanRow.html#procs-instance_method" title="CSVDecision::ScanRow#procs (method)">#procs</a></span>
|
578
666
|
<small>CSVDecision::ScanRow</small>
|
@@ -580,7 +668,7 @@
|
|
580
668
|
</li>
|
581
669
|
|
582
670
|
|
583
|
-
<li class="
|
671
|
+
<li class="odd ">
|
584
672
|
<div class="item">
|
585
673
|
<span class='object_link'><a href="CSVDecision/Matchers.html#regexp-class_method" title="CSVDecision::Matchers.regexp (method)">regexp</a></span>
|
586
674
|
<small>CSVDecision::Matchers</small>
|
@@ -588,6 +676,14 @@
|
|
588
676
|
</li>
|
589
677
|
|
590
678
|
|
679
|
+
<li class="even ">
|
680
|
+
<div class="item">
|
681
|
+
<span class='object_link'><a href="CSVDecision/Matchers/Guard.html#regexp_match-class_method" title="CSVDecision::Matchers::Guard.regexp_match (method)">regexp_match</a></span>
|
682
|
+
<small>CSVDecision::Matchers::Guard</small>
|
683
|
+
</div>
|
684
|
+
</li>
|
685
|
+
|
686
|
+
|
591
687
|
<li class="odd ">
|
592
688
|
<div class="item">
|
593
689
|
<span class='object_link'><a href="CSVDecision.html#root-class_method" title="CSVDecision.root (method)">root</a></span>
|
@@ -694,8 +790,8 @@
|
|
694
790
|
|
695
791
|
<li class="even ">
|
696
792
|
<div class="item">
|
697
|
-
<span class='object_link'><a href="CSVDecision/
|
698
|
-
<small>CSVDecision::
|
793
|
+
<span class='object_link'><a href="CSVDecision/Dictionary/Entry.html#type-instance_method" title="CSVDecision::Dictionary::Entry#type (method)">#type</a></span>
|
794
|
+
<small>CSVDecision::Dictionary::Entry</small>
|
699
795
|
</div>
|
700
796
|
</li>
|
701
797
|
|
@@ -100,9 +100,9 @@
|
|
100
100
|
</div>
|
101
101
|
|
102
102
|
<div id="footer">
|
103
|
-
Generated on
|
103
|
+
Generated on Fri Jan 5 21:43:59 2018 by
|
104
104
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
105
|
-
0.9.12 (ruby-2.
|
105
|
+
0.9.12 (ruby-2.4.0).
|
106
106
|
</div>
|
107
107
|
|
108
108
|
</div>
|
data/lib/csv_decision/columns.rb
CHANGED
@@ -8,13 +8,6 @@ module CSVDecision
|
|
8
8
|
# Dictionary of all this table's columns - inputs, outputs etc.
|
9
9
|
# @api private
|
10
10
|
class Columns
|
11
|
-
# Value object to hold column dictionary entries.
|
12
|
-
Entry = Struct.new(:name, :eval, :type) do
|
13
|
-
def ins?
|
14
|
-
%i[in guard].member?(type) ? true : false
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
11
|
# TODO: Value object used for any columns with defaults
|
19
12
|
# Default = Struct.new(:name, :function, :default_if)
|
20
13
|
|
@@ -88,7 +81,7 @@ module CSVDecision
|
|
88
81
|
row = Header.strip_empty_columns(rows: table.rows)
|
89
82
|
|
90
83
|
# Build a dictionary of all valid data columns from the header row.
|
91
|
-
@dictionary =
|
84
|
+
@dictionary = CSVDecision::Dictionary.build(header: row, dictionary: Dictionary.new) if row
|
92
85
|
|
93
86
|
freeze
|
94
87
|
end
|