csv_decision 0.2.0 → 0.3.0
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 +4 -4
- data/CHANGELOG.md +5 -1
- data/README.md +11 -8
- data/benchmarks/rufus_decision.rb +9 -1
- data/csv_decision.gemspec +1 -1
- data/doc/CSVDecision/CellValidationError.html +1 -1
- data/doc/CSVDecision/Columns/Dictionary.html +29 -29
- data/doc/CSVDecision/Columns.html +394 -47
- data/doc/CSVDecision/Data.html +2 -2
- data/doc/CSVDecision/Decide.html +23 -159
- data/doc/CSVDecision/Decision.html +370 -32
- data/doc/CSVDecision/Defaults.html +1 -1
- data/doc/CSVDecision/Dictionary/Entry.html +157 -55
- data/doc/CSVDecision/Dictionary.html +37 -21
- data/doc/CSVDecision/Error.html +1 -1
- data/doc/CSVDecision/FileError.html +1 -1
- data/doc/CSVDecision/Header.html +142 -1
- data/doc/CSVDecision/Index.html +741 -0
- data/doc/CSVDecision/Input.html +14 -61
- data/doc/CSVDecision/Load.html +1 -1
- data/doc/CSVDecision/Matchers/Constant.html +1 -1
- data/doc/CSVDecision/Matchers/Function.html +1 -1
- data/doc/CSVDecision/Matchers/Guard.html +13 -147
- data/doc/CSVDecision/Matchers/Matcher.html +13 -13
- data/doc/CSVDecision/Matchers/Numeric.html +1 -1
- data/doc/CSVDecision/Matchers/Pattern.html +1 -1
- data/doc/CSVDecision/Matchers/Proc.html +147 -14
- data/doc/CSVDecision/Matchers/Range.html +1 -1
- data/doc/CSVDecision/Matchers/Symbol.html +1 -1
- data/doc/CSVDecision/Matchers.html +55 -162
- data/doc/CSVDecision/Options.html +21 -21
- data/doc/CSVDecision/Parse.html +2 -180
- data/doc/CSVDecision/Result.html +220 -38
- data/doc/CSVDecision/ScanRow.html +69 -325
- data/doc/CSVDecision/Table.html +128 -40
- data/doc/CSVDecision/TableValidationError.html +1 -1
- data/doc/CSVDecision/Validate.html +1 -1
- data/doc/CSVDecision.html +4 -4
- data/doc/_index.html +8 -8
- data/doc/class_list.html +1 -1
- data/doc/file.README.html +13 -11
- data/doc/index.html +13 -11
- data/doc/method_list.html +206 -150
- data/doc/top-level-namespace.html +1 -1
- data/lib/csv_decision/columns.rb +87 -1
- data/lib/csv_decision/decision.rb +54 -29
- data/lib/csv_decision/defaults.rb +1 -1
- data/lib/csv_decision/dictionary.rb +32 -22
- data/lib/csv_decision/header.rb +17 -0
- data/lib/csv_decision/index.rb +107 -0
- data/lib/csv_decision/input.rb +45 -13
- data/lib/csv_decision/matchers/guard.rb +2 -0
- data/lib/csv_decision/matchers.rb +14 -8
- data/lib/csv_decision/options.rb +7 -19
- data/lib/csv_decision/parse.rb +12 -96
- data/lib/csv_decision/result.rb +10 -9
- data/lib/csv_decision/scan_row.rb +20 -44
- data/lib/csv_decision/table.rb +7 -4
- data/lib/csv_decision.rb +1 -1
- data/spec/csv_decision/columns_spec.rb +6 -6
- data/spec/csv_decision/data_spec.rb +0 -5
- data/spec/csv_decision/index_spec.rb +58 -0
- data/spec/csv_decision/input_spec.rb +7 -2
- data/spec/csv_decision/options_spec.rb +16 -1
- data/spec/csv_decision/parse_spec.rb +4 -5
- data/spec/csv_decision/table_spec.rb +70 -0
- data/spec/data/{valid → invalid}/empty.csv +0 -0
- data/spec/data/valid/index_example.csv +12 -0
- data/spec/data/valid/multi_column_index.csv +10 -0
- data/spec/data/valid/multi_column_index2.csv +12 -0
- data/spec/data/valid/options_in_file3.csv +13 -0
- metadata +16 -5
- data/lib/csv_decision/decide.rb +0 -45
data/doc/CSVDecision/Table.html
CHANGED
@@ -195,6 +195,33 @@
|
|
195
195
|
<p>Used to implement filtering of final results.</p>
|
196
196
|
</div></span>
|
197
197
|
|
198
|
+
</li>
|
199
|
+
|
200
|
+
|
201
|
+
<li class="public ">
|
202
|
+
<span class="summary_signature">
|
203
|
+
|
204
|
+
<a href="#index-instance_method" title="#index (instance method)">#<strong>index</strong> ⇒ CSVDecision::Index </a>
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
</span>
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
<span class="summary_desc"><div class='inline'>
|
222
|
+
<p>The index built on one or more input columns.</p>
|
223
|
+
</div></span>
|
224
|
+
|
198
225
|
</li>
|
199
226
|
|
200
227
|
|
@@ -482,9 +509,6 @@ and last row index given.</p>
|
|
482
509
|
<pre class="lines">
|
483
510
|
|
484
511
|
|
485
|
-
76
|
486
|
-
77
|
487
|
-
78
|
488
512
|
79
|
489
513
|
80
|
490
514
|
81
|
@@ -492,22 +516,25 @@ and last row index given.</p>
|
|
492
516
|
83
|
493
517
|
84
|
494
518
|
85
|
495
|
-
86
|
519
|
+
86
|
520
|
+
87
|
521
|
+
88
|
522
|
+
89</pre>
|
496
523
|
</td>
|
497
524
|
<td>
|
498
|
-
<pre class="code"><span class="info file"># File 'lib/csv_decision/table.rb', line
|
525
|
+
<pre class="code"><span class="info file"># File 'lib/csv_decision/table.rb', line 79</span>
|
499
526
|
|
500
527
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
|
501
528
|
<span class='ivar'>@columns</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
502
529
|
<span class='ivar'>@file</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
530
|
+
<span class='ivar'>@index</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
503
531
|
<span class='ivar'>@options</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
504
532
|
<span class='ivar'>@outs_functions</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
505
533
|
<span class='ivar'>@outs_rows</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
506
534
|
<span class='ivar'>@if_rows</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
507
535
|
<span class='ivar'>@rows</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
508
536
|
<span class='ivar'>@scan_rows</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
509
|
-
|
510
|
-
</span><span class='kw'>end</span></pre>
|
537
|
+
<span class='kw'>end</span></pre>
|
511
538
|
</td>
|
512
539
|
</tr>
|
513
540
|
</table>
|
@@ -690,12 +717,12 @@ and last row index given.</p>
|
|
690
717
|
<pre class="lines">
|
691
718
|
|
692
719
|
|
693
|
-
|
694
|
-
|
695
|
-
|
720
|
+
61
|
721
|
+
62
|
722
|
+
63</pre>
|
696
723
|
</td>
|
697
724
|
<td>
|
698
|
-
<pre class="code"><span class="info file"># File 'lib/csv_decision/table.rb', line
|
725
|
+
<pre class="code"><span class="info file"># File 'lib/csv_decision/table.rb', line 61</span>
|
699
726
|
|
700
727
|
<span class='kw'>def</span> <span class='id identifier rubyid_if_rows'>if_rows</span>
|
701
728
|
<span class='ivar'>@if_rows</span>
|
@@ -706,6 +733,67 @@ and last row index given.</p>
|
|
706
733
|
</div>
|
707
734
|
|
708
735
|
|
736
|
+
<span id="index=-instance_method"></span>
|
737
|
+
<div class="method_details ">
|
738
|
+
<h3 class="signature " id="index-instance_method">
|
739
|
+
|
740
|
+
#<strong>index</strong> ⇒ <tt><span class='object_link'><a href="Index.html" title="CSVDecision::Index (class)">CSVDecision::Index</a></span></tt>
|
741
|
+
|
742
|
+
|
743
|
+
|
744
|
+
|
745
|
+
|
746
|
+
</h3><div class="docstring">
|
747
|
+
<div class="discussion">
|
748
|
+
|
749
|
+
<p>Returns The index built on one or more input columns.</p>
|
750
|
+
|
751
|
+
|
752
|
+
</div>
|
753
|
+
</div>
|
754
|
+
<div class="tags">
|
755
|
+
|
756
|
+
<p class="tag_title">Returns:</p>
|
757
|
+
<ul class="return">
|
758
|
+
|
759
|
+
<li>
|
760
|
+
|
761
|
+
|
762
|
+
<span class='type'>(<tt><span class='object_link'><a href="Index.html" title="CSVDecision::Index (class)">CSVDecision::Index</a></span></tt>)</span>
|
763
|
+
|
764
|
+
|
765
|
+
|
766
|
+
—
|
767
|
+
<div class='inline'>
|
768
|
+
<p>The index built on one or more input columns.</p>
|
769
|
+
</div>
|
770
|
+
|
771
|
+
</li>
|
772
|
+
|
773
|
+
</ul>
|
774
|
+
|
775
|
+
</div><table class="source_code">
|
776
|
+
<tr>
|
777
|
+
<td>
|
778
|
+
<pre class="lines">
|
779
|
+
|
780
|
+
|
781
|
+
37
|
782
|
+
38
|
783
|
+
39</pre>
|
784
|
+
</td>
|
785
|
+
<td>
|
786
|
+
<pre class="code"><span class="info file"># File 'lib/csv_decision/table.rb', line 37</span>
|
787
|
+
|
788
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_index'>index</span>
|
789
|
+
<span class='ivar'>@index</span>
|
790
|
+
<span class='kw'>end</span></pre>
|
791
|
+
</td>
|
792
|
+
</tr>
|
793
|
+
</table>
|
794
|
+
</div>
|
795
|
+
|
796
|
+
|
709
797
|
<span id="options=-instance_method"></span>
|
710
798
|
<div class="method_details ">
|
711
799
|
<h3 class="signature " id="options-instance_method">
|
@@ -751,12 +839,12 @@ and last row index given.</p>
|
|
751
839
|
<pre class="lines">
|
752
840
|
|
753
841
|
|
754
|
-
|
755
|
-
|
756
|
-
|
842
|
+
40
|
843
|
+
41
|
844
|
+
42</pre>
|
757
845
|
</td>
|
758
846
|
<td>
|
759
|
-
<pre class="code"><span class="info file"># File 'lib/csv_decision/table.rb', line
|
847
|
+
<pre class="code"><span class="info file"># File 'lib/csv_decision/table.rb', line 40</span>
|
760
848
|
|
761
849
|
<span class='kw'>def</span> <span class='id identifier rubyid_options'>options</span>
|
762
850
|
<span class='ivar'>@options</span>
|
@@ -798,12 +886,12 @@ and last row index given.</p>
|
|
798
886
|
<pre class="lines">
|
799
887
|
|
800
888
|
|
801
|
-
|
802
|
-
|
803
|
-
|
889
|
+
44
|
890
|
+
45
|
891
|
+
46</pre>
|
804
892
|
</td>
|
805
893
|
<td>
|
806
|
-
<pre class="code"><span class="info file"># File 'lib/csv_decision/table.rb', line
|
894
|
+
<pre class="code"><span class="info file"># File 'lib/csv_decision/table.rb', line 44</span>
|
807
895
|
|
808
896
|
<span class='kw'>def</span> <span class='id identifier rubyid_outs_functions'>outs_functions</span>
|
809
897
|
<span class='ivar'>@outs_functions</span>
|
@@ -863,12 +951,12 @@ and last row index given.</p>
|
|
863
951
|
<pre class="lines">
|
864
952
|
|
865
953
|
|
866
|
-
|
867
|
-
|
868
|
-
|
954
|
+
57
|
955
|
+
58
|
956
|
+
59</pre>
|
869
957
|
</td>
|
870
958
|
<td>
|
871
|
-
<pre class="code"><span class="info file"># File 'lib/csv_decision/table.rb', line
|
959
|
+
<pre class="code"><span class="info file"># File 'lib/csv_decision/table.rb', line 57</span>
|
872
960
|
|
873
961
|
<span class='kw'>def</span> <span class='id identifier rubyid_outs_rows'>outs_rows</span>
|
874
962
|
<span class='ivar'>@outs_rows</span>
|
@@ -928,12 +1016,12 @@ and last row index given.</p>
|
|
928
1016
|
<pre class="lines">
|
929
1017
|
|
930
1018
|
|
931
|
-
|
932
|
-
|
933
|
-
|
1019
|
+
48
|
1020
|
+
49
|
1021
|
+
50</pre>
|
934
1022
|
</td>
|
935
1023
|
<td>
|
936
|
-
<pre class="code"><span class="info file"># File 'lib/csv_decision/table.rb', line
|
1024
|
+
<pre class="code"><span class="info file"># File 'lib/csv_decision/table.rb', line 48</span>
|
937
1025
|
|
938
1026
|
<span class='kw'>def</span> <span class='id identifier rubyid_rows'>rows</span>
|
939
1027
|
<span class='ivar'>@rows</span>
|
@@ -993,12 +1081,12 @@ and last row index given.</p>
|
|
993
1081
|
<pre class="lines">
|
994
1082
|
|
995
1083
|
|
996
|
-
|
997
|
-
|
998
|
-
|
1084
|
+
53
|
1085
|
+
54
|
1086
|
+
55</pre>
|
999
1087
|
</td>
|
1000
1088
|
<td>
|
1001
|
-
<pre class="code"><span class="info file"># File 'lib/csv_decision/table.rb', line
|
1089
|
+
<pre class="code"><span class="info file"># File 'lib/csv_decision/table.rb', line 53</span>
|
1002
1090
|
|
1003
1091
|
<span class='kw'>def</span> <span class='id identifier rubyid_scan_rows'>scan_rows</span>
|
1004
1092
|
<span class='ivar'>@scan_rows</span>
|
@@ -1095,7 +1183,7 @@ and last row index given.</p>
|
|
1095
1183
|
<pre class="code"><span class="info file"># File 'lib/csv_decision/table.rb', line 15</span>
|
1096
1184
|
|
1097
1185
|
<span class='kw'>def</span> <span class='id identifier rubyid_decide'>decide</span><span class='lparen'>(</span><span class='id identifier rubyid_input'>input</span><span class='rparen'>)</span>
|
1098
|
-
<span class='const'><span class='object_link'><a href="
|
1186
|
+
<span class='const'><span class='object_link'><a href="Decision.html" title="CSVDecision::Decision (class)">Decision</a></span></span><span class='period'>.</span><span class='id identifier rubyid_make'><span class='object_link'><a href="Decision.html#make-class_method" title="CSVDecision::Decision.make (method)">make</a></span></span><span class='lparen'>(</span><span class='label'>table:</span> <span class='kw'>self</span><span class='comma'>,</span> <span class='label'>input:</span> <span class='id identifier rubyid_input'>input</span><span class='comma'>,</span> <span class='label'>symbolize_keys:</span> <span class='kw'>true</span><span class='rparen'>)</span>
|
1099
1187
|
<span class='kw'>end</span></pre>
|
1100
1188
|
</td>
|
1101
1189
|
</tr>
|
@@ -1184,7 +1272,7 @@ hash is symbolized.</p>
|
|
1184
1272
|
<pre class="code"><span class="info file"># File 'lib/csv_decision/table.rb', line 26</span>
|
1185
1273
|
|
1186
1274
|
<span class='kw'>def</span> <span class='id identifier rubyid_decide!'>decide!</span><span class='lparen'>(</span><span class='id identifier rubyid_input'>input</span><span class='rparen'>)</span>
|
1187
|
-
<span class='const'><span class='object_link'><a href="
|
1275
|
+
<span class='const'><span class='object_link'><a href="Decision.html" title="CSVDecision::Decision (class)">Decision</a></span></span><span class='period'>.</span><span class='id identifier rubyid_make'><span class='object_link'><a href="Decision.html#make-class_method" title="CSVDecision::Decision.make (method)">make</a></span></span><span class='lparen'>(</span><span class='label'>table:</span> <span class='kw'>self</span><span class='comma'>,</span> <span class='label'>input:</span> <span class='id identifier rubyid_input'>input</span><span class='comma'>,</span> <span class='label'>symbolize_keys:</span> <span class='kw'>false</span><span class='rparen'>)</span>
|
1188
1276
|
<span class='kw'>end</span></pre>
|
1189
1277
|
</td>
|
1190
1278
|
</tr>
|
@@ -1262,21 +1350,21 @@ and last row index given.</p>
|
|
1262
1350
|
<pre class="lines">
|
1263
1351
|
|
1264
1352
|
|
1265
|
-
66
|
1266
|
-
67
|
1267
|
-
68
|
1268
1353
|
69
|
1269
1354
|
70
|
1270
1355
|
71
|
1271
1356
|
72
|
1272
|
-
73
|
1357
|
+
73
|
1358
|
+
74
|
1359
|
+
75
|
1360
|
+
76</pre>
|
1273
1361
|
</td>
|
1274
1362
|
<td>
|
1275
|
-
<pre class="code"><span class="info file"># File 'lib/csv_decision/table.rb', line
|
1363
|
+
<pre class="code"><span class="info file"># File 'lib/csv_decision/table.rb', line 69</span>
|
1276
1364
|
|
1277
1365
|
<span class='kw'>def</span> <span class='id identifier rubyid_each'>each</span><span class='lparen'>(</span><span class='id identifier rubyid_first'>first</span> <span class='op'>=</span> <span class='int'>0</span><span class='comma'>,</span> <span class='id identifier rubyid_last'>last</span> <span class='op'>=</span> <span class='ivar'>@rows</span><span class='period'>.</span><span class='id identifier rubyid_count'>count</span> <span class='op'>-</span> <span class='int'>1</span><span class='rparen'>)</span>
|
1278
1366
|
<span class='id identifier rubyid_index'>index</span> <span class='op'>=</span> <span class='id identifier rubyid_first'>first</span>
|
1279
|
-
<span class='kw'>while</span> <span class='id identifier rubyid_index'>index</span> <span class='op'><=</span> <span class='
|
1367
|
+
<span class='kw'>while</span> <span class='id identifier rubyid_index'>index</span> <span class='op'><=</span> <span class='id identifier rubyid_last'>last</span>
|
1280
1368
|
<span class='kw'>yield</span><span class='lparen'>(</span><span class='ivar'>@rows</span><span class='lbracket'>[</span><span class='id identifier rubyid_index'>index</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_index'>index</span><span class='rparen'>)</span>
|
1281
1369
|
|
1282
1370
|
<span class='id identifier rubyid_index'>index</span> <span class='op'>+=</span> <span class='int'>1</span>
|
@@ -1292,7 +1380,7 @@ and last row index given.</p>
|
|
1292
1380
|
</div>
|
1293
1381
|
|
1294
1382
|
<div id="footer">
|
1295
|
-
Generated on Sat Jan
|
1383
|
+
Generated on Sat Jan 20 15:44:35 2018 by
|
1296
1384
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1297
1385
|
0.9.12 (ruby-2.4.0).
|
1298
1386
|
</div>
|
@@ -133,7 +133,7 @@
|
|
133
133
|
</div>
|
134
134
|
|
135
135
|
<div id="footer">
|
136
|
-
Generated on Sat Jan
|
136
|
+
Generated on Sat Jan 20 15:44:35 2018 by
|
137
137
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
138
138
|
0.9.12 (ruby-2.4.0).
|
139
139
|
</div>
|
@@ -412,7 +412,7 @@ only required at table load time.</p>
|
|
412
412
|
</div>
|
413
413
|
|
414
414
|
<div id="footer">
|
415
|
-
Generated on Sat Jan
|
415
|
+
Generated on Sat Jan 20 15:44:34 2018 by
|
416
416
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
417
417
|
0.9.12 (ruby-2.4.0).
|
418
418
|
</div>
|
data/doc/CSVDecision.html
CHANGED
@@ -79,7 +79,7 @@
|
|
79
79
|
<dl>
|
80
80
|
<dt>Defined in:</dt>
|
81
81
|
<dd>lib/csv_decision.rb<span class="defines">,<br />
|
82
|
-
lib/csv_decision/data.rb,<br /> lib/csv_decision/load.rb,<br /> lib/csv_decision/
|
82
|
+
lib/csv_decision/data.rb,<br /> lib/csv_decision/load.rb,<br /> lib/csv_decision/index.rb,<br /> lib/csv_decision/input.rb,<br /> lib/csv_decision/parse.rb,<br /> lib/csv_decision/table.rb,<br /> lib/csv_decision/header.rb,<br /> lib/csv_decision/result.rb,<br /> lib/csv_decision/columns.rb,<br /> lib/csv_decision/options.rb,<br /> lib/csv_decision/decision.rb,<br /> lib/csv_decision/defaults.rb,<br /> lib/csv_decision/matchers.rb,<br /> lib/csv_decision/scan_row.rb,<br /> lib/csv_decision/validate.rb,<br /> lib/csv_decision/dictionary.rb,<br /> lib/csv_decision/matchers/guard.rb,<br /> lib/csv_decision/matchers/range.rb,<br /> lib/csv_decision/matchers/symbol.rb,<br /> lib/csv_decision/matchers/numeric.rb,<br /> lib/csv_decision/matchers/pattern.rb,<br /> lib/csv_decision/matchers/constant.rb,<br /> lib/csv_decision/matchers/function.rb</span>
|
83
83
|
</dd>
|
84
84
|
</dl>
|
85
85
|
|
@@ -117,11 +117,11 @@ LICENSE and README.md for details.</p>
|
|
117
117
|
<p class="children">
|
118
118
|
|
119
119
|
|
120
|
-
<strong class="modules">Modules:</strong> <span class='object_link'><a href="CSVDecision/Data.html" title="CSVDecision::Data (module)">Data</a></span>, <span class='object_link'><a href="CSVDecision/
|
120
|
+
<strong class="modules">Modules:</strong> <span class='object_link'><a href="CSVDecision/Data.html" title="CSVDecision::Data (module)">Data</a></span>, <span class='object_link'><a href="CSVDecision/Defaults.html" title="CSVDecision::Defaults (module)">Defaults</a></span>, <span class='object_link'><a href="CSVDecision/Dictionary.html" title="CSVDecision::Dictionary (module)">Dictionary</a></span>, <span class='object_link'><a href="CSVDecision/Header.html" title="CSVDecision::Header (module)">Header</a></span>, <span class='object_link'><a href="CSVDecision/Input.html" title="CSVDecision::Input (module)">Input</a></span>, <span class='object_link'><a href="CSVDecision/Load.html" title="CSVDecision::Load (module)">Load</a></span>, <span class='object_link'><a href="CSVDecision/Options.html" title="CSVDecision::Options (module)">Options</a></span>, <span class='object_link'><a href="CSVDecision/Parse.html" title="CSVDecision::Parse (module)">Parse</a></span>, <span class='object_link'><a href="CSVDecision/Validate.html" title="CSVDecision::Validate (module)">Validate</a></span>
|
121
121
|
|
122
122
|
|
123
123
|
|
124
|
-
<strong class="classes">Classes:</strong> <span class='object_link'><a href="CSVDecision/CellValidationError.html" title="CSVDecision::CellValidationError (class)">CellValidationError</a></span>, <span class='object_link'><a href="CSVDecision/Columns.html" title="CSVDecision::Columns (class)">Columns</a></span>, <span class='object_link'><a href="CSVDecision/Decision.html" title="CSVDecision::Decision (class)">Decision</a></span>, <span class='object_link'><a href="CSVDecision/Error.html" title="CSVDecision::Error (class)">Error</a></span>, <span class='object_link'><a href="CSVDecision/FileError.html" title="CSVDecision::FileError (class)">FileError</a></span>, <span class='object_link'><a href="CSVDecision/Matchers.html" title="CSVDecision::Matchers (class)">Matchers</a></span>, <span class='object_link'><a href="CSVDecision/Result.html" title="CSVDecision::Result (class)">Result</a></span>, <span class='object_link'><a href="CSVDecision/ScanRow.html" title="CSVDecision::ScanRow (class)">ScanRow</a></span>, <span class='object_link'><a href="CSVDecision/Table.html" title="CSVDecision::Table (class)">Table</a></span>, <span class='object_link'><a href="CSVDecision/TableValidationError.html" title="CSVDecision::TableValidationError (class)">TableValidationError</a></span>
|
124
|
+
<strong class="classes">Classes:</strong> <span class='object_link'><a href="CSVDecision/CellValidationError.html" title="CSVDecision::CellValidationError (class)">CellValidationError</a></span>, <span class='object_link'><a href="CSVDecision/Columns.html" title="CSVDecision::Columns (class)">Columns</a></span>, <span class='object_link'><a href="CSVDecision/Decision.html" title="CSVDecision::Decision (class)">Decision</a></span>, <span class='object_link'><a href="CSVDecision/Error.html" title="CSVDecision::Error (class)">Error</a></span>, <span class='object_link'><a href="CSVDecision/FileError.html" title="CSVDecision::FileError (class)">FileError</a></span>, <span class='object_link'><a href="CSVDecision/Index.html" title="CSVDecision::Index (class)">Index</a></span>, <span class='object_link'><a href="CSVDecision/Matchers.html" title="CSVDecision::Matchers (class)">Matchers</a></span>, <span class='object_link'><a href="CSVDecision/Result.html" title="CSVDecision::Result (class)">Result</a></span>, <span class='object_link'><a href="CSVDecision/ScanRow.html" title="CSVDecision::ScanRow (class)">ScanRow</a></span>, <span class='object_link'><a href="CSVDecision/Table.html" title="CSVDecision::Table (class)">Table</a></span>, <span class='object_link'><a href="CSVDecision/TableValidationError.html" title="CSVDecision::TableValidationError (class)">TableValidationError</a></span>
|
125
125
|
|
126
126
|
|
127
127
|
</p>
|
@@ -606,7 +606,7 @@ table.decide(topic: 'finance', region: 'Europe') #=> team_mem
|
|
606
606
|
</div>
|
607
607
|
|
608
608
|
<div id="footer">
|
609
|
-
Generated on Sat Jan
|
609
|
+
Generated on Sat Jan 20 15:44:34 2018 by
|
610
610
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
611
611
|
0.9.12 (ruby-2.4.0).
|
612
612
|
</div>
|
data/doc/_index.html
CHANGED
@@ -121,13 +121,6 @@
|
|
121
121
|
|
122
122
|
</li>
|
123
123
|
|
124
|
-
<li>
|
125
|
-
<span class='object_link'><a href="CSVDecision/Decide.html" title="CSVDecision::Decide (module)">Decide</a></span>
|
126
|
-
|
127
|
-
<small>(CSVDecision)</small>
|
128
|
-
|
129
|
-
</li>
|
130
|
-
|
131
124
|
<li>
|
132
125
|
<span class='object_link'><a href="CSVDecision/Decision.html" title="CSVDecision::Decision (class)">Decision</a></span>
|
133
126
|
|
@@ -238,6 +231,13 @@
|
|
238
231
|
<li class="letter">I</li>
|
239
232
|
<ul>
|
240
233
|
|
234
|
+
<li>
|
235
|
+
<span class='object_link'><a href="CSVDecision/Index.html" title="CSVDecision::Index (class)">Index</a></span>
|
236
|
+
|
237
|
+
<small>(CSVDecision)</small>
|
238
|
+
|
239
|
+
</li>
|
240
|
+
|
241
241
|
<li>
|
242
242
|
<span class='object_link'><a href="CSVDecision/Input.html" title="CSVDecision::Input (module)">Input</a></span>
|
243
243
|
|
@@ -440,7 +440,7 @@
|
|
440
440
|
</div>
|
441
441
|
|
442
442
|
<div id="footer">
|
443
|
-
Generated on Sat Jan
|
443
|
+
Generated on Sat Jan 20 15:44:33 2018 by
|
444
444
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
445
445
|
0.9.12 (ruby-2.4.0).
|
446
446
|
</div>
|
data/doc/class_list.html
CHANGED
@@ -43,7 +43,7 @@
|
|
43
43
|
|
44
44
|
<ul id="full_list" class="class">
|
45
45
|
<li id="object_" class="odd"><div class="item" style="padding-left:30px"><span class='object_link'><a href="top-level-namespace.html" title="Top Level Namespace (root)">Top Level Namespace</a></span></div></li>
|
46
|
-
<li id='object_CSVDecision' class='even'><div class='item' style='padding-left:30px'><a class='toggle'></a> <span class='object_link'><a href="CSVDecision.html" title="CSVDecision (module)">CSVDecision</a></span><small class='search_info'>Top Level Namespace</small></div><ul><li id='object_CSVDecision::CellValidationError' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="CSVDecision/CellValidationError.html" title="CSVDecision::CellValidationError (class)">CellValidationError</a></span> < Error<small class='search_info'>CSVDecision</small></div></li><li id='object_CSVDecision::Columns' class='collapsed even'><div class='item' style='padding-left:45px'><a class='toggle'></a> <span class='object_link'><a href="CSVDecision/Columns.html" title="CSVDecision::Columns (class)">Columns</a></span> < Object<small class='search_info'>CSVDecision</small></div><ul><li id='object_CSVDecision::Columns::Dictionary' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="CSVDecision/Columns/Dictionary.html" title="CSVDecision::Columns::Dictionary (class)">Dictionary</a></span> < Object<small class='search_info'>CSVDecision::Columns</small></div></li></ul></li><li id='object_CSVDecision::Data' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="CSVDecision/Data.html" title="CSVDecision::Data (module)">Data</a></span><small class='search_info'>CSVDecision</small></div></li><li id='object_CSVDecision::
|
46
|
+
<li id='object_CSVDecision' class='even'><div class='item' style='padding-left:30px'><a class='toggle'></a> <span class='object_link'><a href="CSVDecision.html" title="CSVDecision (module)">CSVDecision</a></span><small class='search_info'>Top Level Namespace</small></div><ul><li id='object_CSVDecision::CellValidationError' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="CSVDecision/CellValidationError.html" title="CSVDecision::CellValidationError (class)">CellValidationError</a></span> < Error<small class='search_info'>CSVDecision</small></div></li><li id='object_CSVDecision::Columns' class='collapsed even'><div class='item' style='padding-left:45px'><a class='toggle'></a> <span class='object_link'><a href="CSVDecision/Columns.html" title="CSVDecision::Columns (class)">Columns</a></span> < Object<small class='search_info'>CSVDecision</small></div><ul><li id='object_CSVDecision::Columns::Dictionary' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="CSVDecision/Columns/Dictionary.html" title="CSVDecision::Columns::Dictionary (class)">Dictionary</a></span> < Object<small class='search_info'>CSVDecision::Columns</small></div></li></ul></li><li id='object_CSVDecision::Data' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="CSVDecision/Data.html" title="CSVDecision::Data (module)">Data</a></span><small class='search_info'>CSVDecision</small></div></li><li id='object_CSVDecision::Decision' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="CSVDecision/Decision.html" title="CSVDecision::Decision (class)">Decision</a></span> < Object<small class='search_info'>CSVDecision</small></div></li><li id='object_CSVDecision::Defaults' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="CSVDecision/Defaults.html" title="CSVDecision::Defaults (module)">Defaults</a></span><small class='search_info'>CSVDecision</small></div></li><li id='object_CSVDecision::Dictionary' class='collapsed even'><div class='item' style='padding-left:45px'><a class='toggle'></a> <span class='object_link'><a href="CSVDecision/Dictionary.html" title="CSVDecision::Dictionary (module)">Dictionary</a></span><small class='search_info'>CSVDecision</small></div><ul><li id='object_CSVDecision::Dictionary::Entry' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="CSVDecision/Dictionary/Entry.html" title="CSVDecision::Dictionary::Entry (class)">Entry</a></span> < Object<small class='search_info'>CSVDecision::Dictionary</small></div></li></ul></li><li id='object_CSVDecision::Error' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="CSVDecision/Error.html" title="CSVDecision::Error (class)">Error</a></span> < StandardError<small class='search_info'>CSVDecision</small></div></li><li id='object_CSVDecision::FileError' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="CSVDecision/FileError.html" title="CSVDecision::FileError (class)">FileError</a></span> < Error<small class='search_info'>CSVDecision</small></div></li><li id='object_CSVDecision::Header' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="CSVDecision/Header.html" title="CSVDecision::Header (module)">Header</a></span><small class='search_info'>CSVDecision</small></div></li><li id='object_CSVDecision::Index' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="CSVDecision/Index.html" title="CSVDecision::Index (class)">Index</a></span> < Object<small class='search_info'>CSVDecision</small></div></li><li id='object_CSVDecision::Input' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="CSVDecision/Input.html" title="CSVDecision::Input (module)">Input</a></span><small class='search_info'>CSVDecision</small></div></li><li id='object_CSVDecision::Load' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="CSVDecision/Load.html" title="CSVDecision::Load (module)">Load</a></span><small class='search_info'>CSVDecision</small></div></li><li id='object_CSVDecision::Matchers' class='collapsed odd'><div class='item' style='padding-left:45px'><a class='toggle'></a> <span class='object_link'><a href="CSVDecision/Matchers.html" title="CSVDecision::Matchers (class)">Matchers</a></span> < Object<small class='search_info'>CSVDecision</small></div><ul><li id='object_CSVDecision::Matchers::Constant' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="CSVDecision/Matchers/Constant.html" title="CSVDecision::Matchers::Constant (class)">Constant</a></span> < Matcher<small class='search_info'>CSVDecision::Matchers</small></div></li><li id='object_CSVDecision::Matchers::Function' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="CSVDecision/Matchers/Function.html" title="CSVDecision::Matchers::Function (class)">Function</a></span> < Matcher<small class='search_info'>CSVDecision::Matchers</small></div></li><li id='object_CSVDecision::Matchers::Guard' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="CSVDecision/Matchers/Guard.html" title="CSVDecision::Matchers::Guard (class)">Guard</a></span> < Matcher<small class='search_info'>CSVDecision::Matchers</small></div></li><li id='object_CSVDecision::Matchers::Matcher' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="CSVDecision/Matchers/Matcher.html" title="CSVDecision::Matchers::Matcher (class)">Matcher</a></span> < Object<small class='search_info'>CSVDecision::Matchers</small></div></li><li id='object_CSVDecision::Matchers::Numeric' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="CSVDecision/Matchers/Numeric.html" title="CSVDecision::Matchers::Numeric (class)">Numeric</a></span> < Matcher<small class='search_info'>CSVDecision::Matchers</small></div></li><li id='object_CSVDecision::Matchers::Pattern' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="CSVDecision/Matchers/Pattern.html" title="CSVDecision::Matchers::Pattern (class)">Pattern</a></span> < Matcher<small class='search_info'>CSVDecision::Matchers</small></div></li><li id='object_CSVDecision::Matchers::Proc' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="CSVDecision/Matchers/Proc.html" title="CSVDecision::Matchers::Proc (class)">Proc</a></span> < Array<small class='search_info'>CSVDecision::Matchers</small></div></li><li id='object_CSVDecision::Matchers::Range' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="CSVDecision/Matchers/Range.html" title="CSVDecision::Matchers::Range (class)">Range</a></span> < Matcher<small class='search_info'>CSVDecision::Matchers</small></div></li><li id='object_CSVDecision::Matchers::Symbol' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="CSVDecision/Matchers/Symbol.html" title="CSVDecision::Matchers::Symbol (class)">Symbol</a></span> < Matcher<small class='search_info'>CSVDecision::Matchers</small></div></li></ul></li><li id='object_CSVDecision::Options' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="CSVDecision/Options.html" title="CSVDecision::Options (module)">Options</a></span><small class='search_info'>CSVDecision</small></div></li><li id='object_CSVDecision::Parse' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="CSVDecision/Parse.html" title="CSVDecision::Parse (module)">Parse</a></span><small class='search_info'>CSVDecision</small></div></li><li id='object_CSVDecision::Result' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="CSVDecision/Result.html" title="CSVDecision::Result (class)">Result</a></span> < Object<small class='search_info'>CSVDecision</small></div></li><li id='object_CSVDecision::ScanRow' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="CSVDecision/ScanRow.html" title="CSVDecision::ScanRow (class)">ScanRow</a></span> < Object<small class='search_info'>CSVDecision</small></div></li><li id='object_CSVDecision::Table' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="CSVDecision/Table.html" title="CSVDecision::Table (class)">Table</a></span> < Object<small class='search_info'>CSVDecision</small></div></li><li id='object_CSVDecision::TableValidationError' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="CSVDecision/TableValidationError.html" title="CSVDecision::TableValidationError (class)">TableValidationError</a></span> < Error<small class='search_info'>CSVDecision</small></div></li><li id='object_CSVDecision::Validate' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="CSVDecision/Validate.html" title="CSVDecision::Validate (module)">Validate</a></span><small class='search_info'>CSVDecision</small></div></li></ul></li>
|
47
47
|
|
48
48
|
</ul>
|
49
49
|
</div>
|
data/doc/file.README.html
CHANGED
@@ -102,7 +102,7 @@ see <code>benchmarks/rufus_decision.rb</code>.)</p>
|
|
102
102
|
<p>To get started, just add <code>csv_decision</code> to your
|
103
103
|
<code>Gemfile</code>, and then run <code>bundle</code>:</p>
|
104
104
|
|
105
|
-
<p><code>ruby gem 'csv_decision'
|
105
|
+
<p><code>ruby gem 'csv_decision' </code></p>
|
106
106
|
|
107
107
|
<p>or simply <code>bash gem install csv_decision </code></p>
|
108
108
|
|
@@ -185,7 +185,9 @@ all matches as an array of hashes (i.e., <code>parse</code> option
|
|
185
185
|
<code>first_match: false</code> or CSV file option
|
186
186
|
<code>accumulate</code>).</p>
|
187
187
|
</li><li>
|
188
|
-
<p>Fast decision-time performance (see <code>benchmarks</code> folder)
|
188
|
+
<p>Fast decision-time performance (see <code>benchmarks</code> folder).
|
189
|
+
Automatically indexes all text-only columns that do not contain any empty
|
190
|
+
strings.</p>
|
189
191
|
</li><li>
|
190
192
|
<p>In addition to simple strings, <code>csv_decision</code> can match basic
|
191
193
|
Ruby constants (e.g., <code>=nil</code>), regular expressions (e.g.,
|
@@ -352,14 +354,14 @@ bundle install rspec </code></p>
|
|
352
354
|
<h3 id="label-Planned+features">Planned features</h3>
|
353
355
|
|
354
356
|
<p><code>csv_decision</code> is still a work in progress, and will be enhanced
|
355
|
-
to support the following features: *
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
357
|
+
to support the following features: * Supply a pre-defined library of
|
358
|
+
functions that may be called within input columns to implement custom
|
359
|
+
matching logic, or from the output columns to formulate the final
|
360
|
+
decision. * Built-in lookup functions evaluate other decision tables to
|
361
|
+
implement guard conditions, or supply output values. * Available
|
362
|
+
functions may be extended with a user-supplied library of Ruby methods for
|
363
|
+
custom logic. * Output columns may construct interpolated strings
|
364
|
+
containing references to column symbols.</p>
|
363
365
|
|
364
366
|
<h3 id="label-Reasons+for+the+limitations+of+column+expressions">Reasons for the limitations of column expressions</h3>
|
365
367
|
|
@@ -383,7 +385,7 @@ href="./LICENSE">LICENSE</a> document for more information.</p>
|
|
383
385
|
</div></div>
|
384
386
|
|
385
387
|
<div id="footer">
|
386
|
-
Generated on Sat Jan
|
388
|
+
Generated on Sat Jan 20 15:44:34 2018 by
|
387
389
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
388
390
|
0.9.12 (ruby-2.4.0).
|
389
391
|
</div>
|
data/doc/index.html
CHANGED
@@ -102,7 +102,7 @@ see <code>benchmarks/rufus_decision.rb</code>.)</p>
|
|
102
102
|
<p>To get started, just add <code>csv_decision</code> to your
|
103
103
|
<code>Gemfile</code>, and then run <code>bundle</code>:</p>
|
104
104
|
|
105
|
-
<p><code>ruby gem 'csv_decision'
|
105
|
+
<p><code>ruby gem 'csv_decision' </code></p>
|
106
106
|
|
107
107
|
<p>or simply <code>bash gem install csv_decision </code></p>
|
108
108
|
|
@@ -185,7 +185,9 @@ all matches as an array of hashes (i.e., <code>parse</code> option
|
|
185
185
|
<code>first_match: false</code> or CSV file option
|
186
186
|
<code>accumulate</code>).</p>
|
187
187
|
</li><li>
|
188
|
-
<p>Fast decision-time performance (see <code>benchmarks</code> folder)
|
188
|
+
<p>Fast decision-time performance (see <code>benchmarks</code> folder).
|
189
|
+
Automatically indexes all text-only columns that do not contain any empty
|
190
|
+
strings.</p>
|
189
191
|
</li><li>
|
190
192
|
<p>In addition to simple strings, <code>csv_decision</code> can match basic
|
191
193
|
Ruby constants (e.g., <code>=nil</code>), regular expressions (e.g.,
|
@@ -352,14 +354,14 @@ bundle install rspec </code></p>
|
|
352
354
|
<h3 id="label-Planned+features">Planned features</h3>
|
353
355
|
|
354
356
|
<p><code>csv_decision</code> is still a work in progress, and will be enhanced
|
355
|
-
to support the following features: *
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
357
|
+
to support the following features: * Supply a pre-defined library of
|
358
|
+
functions that may be called within input columns to implement custom
|
359
|
+
matching logic, or from the output columns to formulate the final
|
360
|
+
decision. * Built-in lookup functions evaluate other decision tables to
|
361
|
+
implement guard conditions, or supply output values. * Available
|
362
|
+
functions may be extended with a user-supplied library of Ruby methods for
|
363
|
+
custom logic. * Output columns may construct interpolated strings
|
364
|
+
containing references to column symbols.</p>
|
363
365
|
|
364
366
|
<h3 id="label-Reasons+for+the+limitations+of+column+expressions">Reasons for the limitations of column expressions</h3>
|
365
367
|
|
@@ -383,7 +385,7 @@ href="./LICENSE">LICENSE</a> document for more information.</p>
|
|
383
385
|
</div></div>
|
384
386
|
|
385
387
|
<div id="footer">
|
386
|
-
Generated on Sat Jan
|
388
|
+
Generated on Sat Jan 20 15:44:34 2018 by
|
387
389
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
388
390
|
0.9.12 (ruby-2.4.0).
|
389
391
|
</div>
|