csv_decision 0.0.8 → 0.0.9

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 (55) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +3 -0
  3. data/CHANGELOG.md +4 -0
  4. data/README.md +62 -28
  5. data/csv_decision.gemspec +1 -1
  6. data/doc/CSVDecision/CellValidationError.html +2 -2
  7. data/doc/CSVDecision/Columns/Dictionary.html +114 -20
  8. data/doc/CSVDecision/Columns/Entry.html +2 -2
  9. data/doc/CSVDecision/Columns.html +109 -27
  10. data/doc/CSVDecision/Data.html +2 -2
  11. data/doc/CSVDecision/Decide.html +2 -2
  12. data/doc/CSVDecision/Decision.html +21 -21
  13. data/doc/CSVDecision/Dictionary/Entry.html +508 -0
  14. data/doc/CSVDecision/Dictionary.html +265 -0
  15. data/doc/CSVDecision/Error.html +2 -2
  16. data/doc/CSVDecision/FileError.html +3 -3
  17. data/doc/CSVDecision/Header.html +37 -136
  18. data/doc/CSVDecision/Input.html +2 -2
  19. data/doc/CSVDecision/Load.html +2 -2
  20. data/doc/CSVDecision/Matchers/Constant.html +2 -2
  21. data/doc/CSVDecision/Matchers/Function.html +2 -2
  22. data/doc/CSVDecision/Matchers/Guard.html +92 -25
  23. data/doc/CSVDecision/Matchers/Matcher.html +14 -18
  24. data/doc/CSVDecision/Matchers/Numeric.html +2 -2
  25. data/doc/CSVDecision/Matchers/Pattern.html +2 -2
  26. data/doc/CSVDecision/Matchers/Range.html +2 -2
  27. data/doc/CSVDecision/Matchers/Symbol.html +2 -2
  28. data/doc/CSVDecision/Matchers.html +5 -5
  29. data/doc/CSVDecision/Options.html +2 -2
  30. data/doc/CSVDecision/Parse.html +6 -4
  31. data/doc/CSVDecision/Result.html +944 -0
  32. data/doc/CSVDecision/ScanRow.html +70 -80
  33. data/doc/CSVDecision/Table.html +134 -54
  34. data/doc/CSVDecision.html +5 -5
  35. data/doc/_index.html +18 -4
  36. data/doc/class_list.html +1 -1
  37. data/doc/file.README.html +132 -62
  38. data/doc/index.html +132 -62
  39. data/doc/method_list.html +156 -60
  40. data/doc/top-level-namespace.html +2 -2
  41. data/lib/csv_decision/columns.rb +1 -8
  42. data/lib/csv_decision/decision.rb +45 -96
  43. data/lib/csv_decision/dictionary.rb +149 -0
  44. data/lib/csv_decision/header.rb +6 -133
  45. data/lib/csv_decision/matchers.rb +1 -2
  46. data/lib/csv_decision/parse.rb +18 -7
  47. data/lib/csv_decision/result.rb +180 -0
  48. data/lib/csv_decision/scan_row.rb +13 -7
  49. data/lib/csv_decision/table.rb +6 -5
  50. data/lib/csv_decision.rb +3 -1
  51. data/spec/csv_decision/columns_spec.rb +25 -4
  52. data/spec/csv_decision/examples_spec.rb +25 -0
  53. data/spec/csv_decision/matchers/guard_spec.rb +26 -9
  54. data/spec/csv_decision/table_spec.rb +48 -2
  55. metadata +7 -2
@@ -385,13 +385,13 @@ hash.</p>
385
385
  <pre class="lines">
386
386
 
387
387
 
388
- 59
389
- 60
390
- 61
391
- 62</pre>
388
+ 86
389
+ 87
390
+ 88
391
+ 89</pre>
392
392
  </td>
393
393
  <td>
394
- <pre class="code"><span class="info file"># File 'lib/csv_decision/scan_row.rb', line 59</span>
394
+ <pre class="code"><span class="info file"># File 'lib/csv_decision/scan_row.rb', line 86</span>
395
395
 
396
396
  <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
397
397
  <span class='ivar'>@constants</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
@@ -457,12 +457,12 @@ hash.</p>
457
457
  <pre class="lines">
458
458
 
459
459
 
460
- 54
461
- 55
462
- 56</pre>
460
+ 81
461
+ 82
462
+ 83</pre>
463
463
  </td>
464
464
  <td>
465
- <pre class="code"><span class="info file"># File 'lib/csv_decision/scan_row.rb', line 54</span>
465
+ <pre class="code"><span class="info file"># File 'lib/csv_decision/scan_row.rb', line 81</span>
466
466
 
467
467
  <span class='kw'>def</span> <span class='id identifier rubyid_constants'>constants</span>
468
468
  <span class='ivar'>@constants</span>
@@ -522,12 +522,12 @@ hash.</p>
522
522
  <pre class="lines">
523
523
 
524
524
 
525
- 57
526
- 58
527
- 59</pre>
525
+ 84
526
+ 85
527
+ 86</pre>
528
528
  </td>
529
529
  <td>
530
- <pre class="code"><span class="info file"># File 'lib/csv_decision/scan_row.rb', line 57</span>
530
+ <pre class="code"><span class="info file"># File 'lib/csv_decision/scan_row.rb', line 84</span>
531
531
 
532
532
  <span class='kw'>def</span> <span class='id identifier rubyid_procs'>procs</span>
533
533
  <span class='ivar'>@procs</span>
@@ -627,18 +627,18 @@ hash.</p>
627
627
  <pre class="lines">
628
628
 
629
629
 
630
- 43
631
- 44
632
- 45
633
- 46
634
- 47
635
- 48
636
- 49
637
- 50
638
- 51</pre>
630
+ 70
631
+ 71
632
+ 72
633
+ 73
634
+ 74
635
+ 75
636
+ 76
637
+ 77
638
+ 78</pre>
639
639
  </td>
640
640
  <td>
641
- <pre class="code"><span class="info file"># File 'lib/csv_decision/scan_row.rb', line 43</span>
641
+ <pre class="code"><span class="info file"># File 'lib/csv_decision/scan_row.rb', line 70</span>
642
642
 
643
643
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_eval_matcher'>eval_matcher</span><span class='lparen'>(</span><span class='label'>proc:</span><span class='comma'>,</span> <span class='label'>hash:</span><span class='comma'>,</span> <span class='label'>value:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
644
644
  <span class='id identifier rubyid_function'>function</span> <span class='op'>=</span> <span class='id identifier rubyid_proc'>proc</span><span class='period'>.</span><span class='id identifier rubyid_function'>function</span>
@@ -723,10 +723,6 @@ hash.</p>
723
723
  <pre class="lines">
724
724
 
725
725
 
726
- 16
727
- 17
728
- 18
729
- 19
730
726
  20
731
727
  21
732
728
  22
@@ -735,25 +731,19 @@ hash.</p>
735
731
  25
736
732
  26
737
733
  27
738
- 28
739
- 29</pre>
734
+ 28</pre>
740
735
  </td>
741
736
  <td>
742
- <pre class="code"><span class="info file"># File 'lib/csv_decision/scan_row.rb', line 16</span>
737
+ <pre class="code"><span class="info file"># File 'lib/csv_decision/scan_row.rb', line 20</span>
743
738
 
744
739
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_scan'>scan</span><span class='lparen'>(</span><span class='label'>column:</span><span class='comma'>,</span> <span class='label'>matchers:</span><span class='comma'>,</span> <span class='label'>cell:</span><span class='rparen'>)</span>
745
- <span class='id identifier rubyid_matchers'>matchers</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_matcher'>matcher</span><span class='op'>|</span>
746
- <span class='comment'># Guard function only accepts the same matchers as an output column.
747
- </span> <span class='kw'>next</span> <span class='kw'>if</span> <span class='id identifier rubyid_column'>column</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span> <span class='op'>==</span> <span class='symbol'>:guard</span> <span class='op'>&amp;&amp;</span> <span class='op'>!</span><span class='id identifier rubyid_matcher'>matcher</span><span class='period'>.</span><span class='id identifier rubyid_outs?'>outs?</span>
748
-
749
- <span class='kw'>if</span> <span class='lparen'>(</span><span class='id identifier rubyid_proc'>proc</span> <span class='op'>=</span> <span class='id identifier rubyid_matcher'>matcher</span><span class='period'>.</span><span class='id identifier rubyid_matches?'>matches?</span><span class='lparen'>(</span><span class='id identifier rubyid_cell'>cell</span><span class='rparen'>)</span><span class='rparen'>)</span>
750
- <span class='id identifier rubyid_guard_constant?'>guard_constant?</span><span class='lparen'>(</span><span class='label'>type:</span> <span class='id identifier rubyid_proc'>proc</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='comma'>,</span> <span class='label'>column:</span> <span class='id identifier rubyid_column'>column</span><span class='rparen'>)</span>
751
- <span class='kw'>return</span> <span class='id identifier rubyid_proc'>proc</span>
752
- <span class='kw'>end</span>
753
- <span class='kw'>end</span>
740
+ <span class='kw'>return</span> <span class='kw'>false</span> <span class='kw'>if</span> <span class='id identifier rubyid_cell'>cell</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span>
741
+
742
+ <span class='id identifier rubyid_proc'>proc</span> <span class='op'>=</span> <span class='id identifier rubyid_scan_matchers'>scan_matchers</span><span class='lparen'>(</span><span class='label'>column:</span> <span class='id identifier rubyid_column'>column</span><span class='comma'>,</span> <span class='label'>matchers:</span> <span class='id identifier rubyid_matchers'>matchers</span><span class='comma'>,</span> <span class='label'>cell:</span> <span class='id identifier rubyid_cell'>cell</span><span class='rparen'>)</span>
743
+ <span class='kw'>return</span> <span class='id identifier rubyid_proc'>proc</span> <span class='kw'>if</span> <span class='id identifier rubyid_proc'>proc</span>
754
744
 
755
- <span class='comment'># Must be a simple string constant - this is OK except for a guard column
756
- </span> <span class='id identifier rubyid_guard_constant?'>guard_constant?</span><span class='lparen'>(</span><span class='label'>type:</span> <span class='symbol'>:constant</span><span class='comma'>,</span> <span class='label'>column:</span> <span class='id identifier rubyid_column'>column</span><span class='rparen'>)</span>
745
+ <span class='comment'># Must be a simple string constant - this is OK except for a certain column types.
746
+ </span> <span class='id identifier rubyid_invalid_constant?'>invalid_constant?</span><span class='lparen'>(</span><span class='label'>type:</span> <span class='symbol'>:constant</span><span class='comma'>,</span> <span class='label'>column:</span> <span class='id identifier rubyid_column'>column</span><span class='rparen'>)</span>
757
747
  <span class='kw'>end</span></pre>
758
748
  </td>
759
749
  </tr>
@@ -845,16 +835,16 @@ hash.</p>
845
835
  <pre class="lines">
846
836
 
847
837
 
848
- 92
849
- 93
850
- 94
851
- 95
852
- 96
853
- 97
854
- 98</pre>
838
+ 119
839
+ 120
840
+ 121
841
+ 122
842
+ 123
843
+ 124
844
+ 125</pre>
855
845
  </td>
856
846
  <td>
857
- <pre class="code"><span class="info file"># File 'lib/csv_decision/scan_row.rb', line 92</span>
847
+ <pre class="code"><span class="info file"># File 'lib/csv_decision/scan_row.rb', line 119</span>
858
848
 
859
849
  <span class='kw'>def</span> <span class='id identifier rubyid_match_constants?'>match_constants?</span><span class='lparen'>(</span><span class='label'>row:</span><span class='comma'>,</span> <span class='label'>scan_cols:</span><span class='rparen'>)</span>
860
850
  <span class='id identifier rubyid_constants'>constants</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_col'>col</span><span class='op'>|</span>
@@ -947,20 +937,20 @@ hash.</p>
947
937
  <pre class="lines">
948
938
 
949
939
 
950
- 104
951
- 105
952
- 106
953
- 107
954
- 108
955
- 109
956
- 110
957
- 111
958
- 112
959
- 113
960
- 114</pre>
940
+ 131
941
+ 132
942
+ 133
943
+ 134
944
+ 135
945
+ 136
946
+ 137
947
+ 138
948
+ 139
949
+ 140
950
+ 141</pre>
961
951
  </td>
962
952
  <td>
963
- <pre class="code"><span class="info file"># File 'lib/csv_decision/scan_row.rb', line 104</span>
953
+ <pre class="code"><span class="info file"># File 'lib/csv_decision/scan_row.rb', line 131</span>
964
954
 
965
955
  <span class='kw'>def</span> <span class='id identifier rubyid_match_procs?'>match_procs?</span><span class='lparen'>(</span><span class='label'>row:</span><span class='comma'>,</span> <span class='label'>input:</span><span class='rparen'>)</span>
966
956
  <span class='id identifier rubyid_hash'>hash</span> <span class='op'>=</span> <span class='id identifier rubyid_input'>input</span><span class='lbracket'>[</span><span class='symbol'>:hash</span><span class='rbracket'>]</span>
@@ -1025,7 +1015,7 @@ hash.</p>
1025
1015
  <span class='name'>columns</span>
1026
1016
 
1027
1017
 
1028
- <span class='type'>(<tt>Array&lt;<span class='object_link'><a href="Columns/Entry.html" title="CSVDecision::Columns::Entry (class)">Columns::Entry</a></span>&gt;</tt>)</span>
1018
+ <span class='type'>(<tt>Array&lt;Columns::Entry&gt;</tt>)</span>
1029
1019
 
1030
1020
 
1031
1021
 
@@ -1080,24 +1070,24 @@ non-string constant.</p>
1080
1070
  <pre class="lines">
1081
1071
 
1082
1072
 
1083
- 72
1084
- 73
1085
- 74
1086
- 75
1087
- 76
1088
- 77
1089
- 78
1090
- 79
1091
- 80
1092
- 81
1093
- 82
1094
- 83
1095
- 84
1096
- 85
1097
- 86</pre>
1073
+ 99
1074
+ 100
1075
+ 101
1076
+ 102
1077
+ 103
1078
+ 104
1079
+ 105
1080
+ 106
1081
+ 107
1082
+ 108
1083
+ 109
1084
+ 110
1085
+ 111
1086
+ 112
1087
+ 113</pre>
1098
1088
  </td>
1099
1089
  <td>
1100
- <pre class="code"><span class="info file"># File 'lib/csv_decision/scan_row.rb', line 72</span>
1090
+ <pre class="code"><span class="info file"># File 'lib/csv_decision/scan_row.rb', line 99</span>
1101
1091
 
1102
1092
  <span class='kw'>def</span> <span class='id identifier rubyid_scan_columns'>scan_columns</span><span class='lparen'>(</span><span class='label'>row:</span><span class='comma'>,</span> <span class='label'>columns:</span><span class='comma'>,</span> <span class='label'>matchers:</span><span class='rparen'>)</span>
1103
1093
  <span class='id identifier rubyid_columns'>columns</span><span class='period'>.</span><span class='id identifier rubyid_each_pair'>each_pair</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_col'>col</span><span class='comma'>,</span> <span class='id identifier rubyid_column'>column</span><span class='op'>|</span>
@@ -1124,9 +1114,9 @@ non-string constant.</p>
1124
1114
  </div>
1125
1115
 
1126
1116
  <div id="footer">
1127
- Generated on Sat Dec 30 13:04:05 2017 by
1117
+ Generated on Fri Jan 5 21:44:01 2018 by
1128
1118
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1129
- 0.9.12 (ruby-2.3.0).
1119
+ 0.9.12 (ruby-2.4.0).
1130
1120
  </div>
1131
1121
 
1132
1122
  </div>
@@ -134,7 +134,7 @@
134
134
 
135
135
 
136
136
 
137
- <span class="private note title">private</span>
137
+
138
138
 
139
139
 
140
140
  <span class="summary_desc"><div class='inline'>
@@ -161,7 +161,7 @@
161
161
 
162
162
 
163
163
 
164
- <span class="private note title">private</span>
164
+
165
165
 
166
166
 
167
167
  <span class="summary_desc"><div class='inline'>
@@ -174,7 +174,7 @@
174
174
  <li class="public ">
175
175
  <span class="summary_signature">
176
176
 
177
- <a href="#options-instance_method" title="#options (instance method)">#<strong>options</strong> &#x21d2; Hash </a>
177
+ <a href="#if_rows-instance_method" title="#if_rows (instance method)">#<strong>if_rows</strong> &#x21d2; Array&lt;CSVDecision::ScanRow&gt; </a>
178
178
 
179
179
 
180
180
 
@@ -191,6 +191,33 @@
191
191
  <span class="private note title">private</span>
192
192
 
193
193
 
194
+ <span class="summary_desc"><div class='inline'>
195
+ <p>Used to implement filtering of final results.</p>
196
+ </div></span>
197
+
198
+ </li>
199
+
200
+
201
+ <li class="public ">
202
+ <span class="summary_signature">
203
+
204
+ <a href="#options-instance_method" title="#options (instance method)">#<strong>options</strong> &#x21d2; Hash </a>
205
+
206
+
207
+
208
+ </span>
209
+
210
+
211
+
212
+
213
+
214
+
215
+
216
+
217
+
218
+
219
+
220
+
194
221
  <span class="summary_desc"><div class='inline'>
195
222
  <p>All options, explicitly set or defaulted, used to parse the table.</p>
196
223
  </div></span>
@@ -455,7 +482,6 @@ and last row index given.</p>
455
482
  <pre class="lines">
456
483
 
457
484
 
458
- 79
459
485
  80
460
486
  81
461
487
  82
@@ -465,22 +491,23 @@ and last row index given.</p>
465
491
  86
466
492
  87
467
493
  88
468
- 89</pre>
494
+ 89
495
+ 90</pre>
469
496
  </td>
470
497
  <td>
471
- <pre class="code"><span class="info file"># File 'lib/csv_decision/table.rb', line 79</span>
498
+ <pre class="code"><span class="info file"># File 'lib/csv_decision/table.rb', line 80</span>
472
499
 
473
500
  <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
474
501
  <span class='ivar'>@columns</span> <span class='op'>=</span> <span class='kw'>nil</span>
475
502
  <span class='ivar'>@file</span> <span class='op'>=</span> <span class='kw'>nil</span>
476
- <span class='ivar'>@matchers</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
477
503
  <span class='ivar'>@options</span> <span class='op'>=</span> <span class='kw'>nil</span>
478
504
  <span class='ivar'>@outs_functions</span> <span class='op'>=</span> <span class='kw'>nil</span>
479
505
  <span class='ivar'>@outs_rows</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
506
+ <span class='ivar'>@if_rows</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
480
507
  <span class='ivar'>@rows</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
481
508
  <span class='ivar'>@scan_rows</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
482
- <span class='ivar'>@tables</span> <span class='op'>=</span> <span class='kw'>nil</span>
483
- <span class='kw'>end</span></pre>
509
+ <span class='comment'># @tables = nil
510
+ </span><span class='kw'>end</span></pre>
484
511
  </td>
485
512
  </tr>
486
513
  </table>
@@ -504,11 +531,7 @@ and last row index given.</p>
504
531
 
505
532
  </h3><div class="docstring">
506
533
  <div class="discussion">
507
- <p class="note private">
508
- <strong>This method is part of a private API.</strong>
509
- You should avoid using this method if possible, as it may be removed or be changed in the future.
510
- </p>
511
-
534
+
512
535
  <p>Returns Dictionary of all input and output columns.</p>
513
536
 
514
537
 
@@ -541,12 +564,12 @@ and last row index given.</p>
541
564
  <pre class="lines">
542
565
 
543
566
 
567
+ 30
544
568
  31
545
- 32
546
- 33</pre>
569
+ 32</pre>
547
570
  </td>
548
571
  <td>
549
- <pre class="code"><span class="info file"># File 'lib/csv_decision/table.rb', line 31</span>
572
+ <pre class="code"><span class="info file"># File 'lib/csv_decision/table.rb', line 30</span>
550
573
 
551
574
  <span class='kw'>def</span> <span class='id identifier rubyid_columns'>columns</span>
552
575
  <span class='ivar'>@columns</span>
@@ -569,11 +592,7 @@ and last row index given.</p>
569
592
 
570
593
  </h3><div class="docstring">
571
594
  <div class="discussion">
572
- <p class="note private">
573
- <strong>This method is part of a private API.</strong>
574
- You should avoid using this method if possible, as it may be removed or be changed in the future.
575
- </p>
576
-
595
+
577
596
  <p>Returns File path name if decision table was loaded from a CSV file.</p>
578
597
 
579
598
 
@@ -606,12 +625,12 @@ and last row index given.</p>
606
625
  <pre class="lines">
607
626
 
608
627
 
609
- 35
610
- 36
611
- 37</pre>
628
+ 33
629
+ 34
630
+ 35</pre>
612
631
  </td>
613
632
  <td>
614
- <pre class="code"><span class="info file"># File 'lib/csv_decision/table.rb', line 35</span>
633
+ <pre class="code"><span class="info file"># File 'lib/csv_decision/table.rb', line 33</span>
615
634
 
616
635
  <span class='kw'>def</span> <span class='id identifier rubyid_file'>file</span>
617
636
  <span class='ivar'>@file</span>
@@ -622,11 +641,11 @@ and last row index given.</p>
622
641
  </div>
623
642
 
624
643
 
625
- <span id="options=-instance_method"></span>
644
+ <span id="if_rows=-instance_method"></span>
626
645
  <div class="method_details ">
627
- <h3 class="signature " id="options-instance_method">
646
+ <h3 class="signature " id="if_rows-instance_method">
628
647
 
629
- #<strong>options</strong> &#x21d2; <tt>Hash</tt>
648
+ #<strong>if_rows</strong> &#x21d2; <tt>Array&lt;<span class='object_link'><a href="ScanRow.html" title="CSVDecision::ScanRow (class)">CSVDecision::ScanRow</a></span>&gt;</tt>
630
649
 
631
650
 
632
651
 
@@ -639,6 +658,67 @@ and last row index given.</p>
639
658
  You should avoid using this method if possible, as it may be removed or be changed in the future.
640
659
  </p>
641
660
 
661
+ <p>Returns Used to implement filtering of final results.</p>
662
+
663
+
664
+ </div>
665
+ </div>
666
+ <div class="tags">
667
+
668
+ <p class="tag_title">Returns:</p>
669
+ <ul class="return">
670
+
671
+ <li>
672
+
673
+
674
+ <span class='type'>(<tt>Array&lt;<span class='object_link'><a href="ScanRow.html" title="CSVDecision::ScanRow (class)">CSVDecision::ScanRow</a></span>&gt;</tt>)</span>
675
+
676
+
677
+
678
+ &mdash;
679
+ <div class='inline'>
680
+ <p>Used to implement filtering of final results.</p>
681
+ </div>
682
+
683
+ </li>
684
+
685
+ </ul>
686
+
687
+ </div><table class="source_code">
688
+ <tr>
689
+ <td>
690
+ <pre class="lines">
691
+
692
+
693
+ 57
694
+ 58
695
+ 59</pre>
696
+ </td>
697
+ <td>
698
+ <pre class="code"><span class="info file"># File 'lib/csv_decision/table.rb', line 57</span>
699
+
700
+ <span class='kw'>def</span> <span class='id identifier rubyid_if_rows'>if_rows</span>
701
+ <span class='ivar'>@if_rows</span>
702
+ <span class='kw'>end</span></pre>
703
+ </td>
704
+ </tr>
705
+ </table>
706
+ </div>
707
+
708
+
709
+ <span id="options=-instance_method"></span>
710
+ <div class="method_details ">
711
+ <h3 class="signature " id="options-instance_method">
712
+
713
+ #<strong>options</strong> &#x21d2; <tt>Hash</tt>
714
+
715
+
716
+
717
+
718
+
719
+ </h3><div class="docstring">
720
+ <div class="discussion">
721
+
642
722
  <p>Returns All options, explicitly set or defaulted, used to parse the table.</p>
643
723
 
644
724
 
@@ -671,12 +751,12 @@ and last row index given.</p>
671
751
  <pre class="lines">
672
752
 
673
753
 
674
- 39
675
- 40
676
- 41</pre>
754
+ 36
755
+ 37
756
+ 38</pre>
677
757
  </td>
678
758
  <td>
679
- <pre class="code"><span class="info file"># File 'lib/csv_decision/table.rb', line 39</span>
759
+ <pre class="code"><span class="info file"># File 'lib/csv_decision/table.rb', line 36</span>
680
760
 
681
761
  <span class='kw'>def</span> <span class='id identifier rubyid_options'>options</span>
682
762
  <span class='ivar'>@options</span>
@@ -718,12 +798,12 @@ and last row index given.</p>
718
798
  <pre class="lines">
719
799
 
720
800
 
721
- 43
722
- 44
723
- 45</pre>
801
+ 40
802
+ 41
803
+ 42</pre>
724
804
  </td>
725
805
  <td>
726
- <pre class="code"><span class="info file"># File 'lib/csv_decision/table.rb', line 43</span>
806
+ <pre class="code"><span class="info file"># File 'lib/csv_decision/table.rb', line 40</span>
727
807
 
728
808
  <span class='kw'>def</span> <span class='id identifier rubyid_outs_functions'>outs_functions</span>
729
809
  <span class='ivar'>@outs_functions</span>
@@ -783,12 +863,12 @@ and last row index given.</p>
783
863
  <pre class="lines">
784
864
 
785
865
 
786
- 56
787
- 57
788
- 58</pre>
866
+ 53
867
+ 54
868
+ 55</pre>
789
869
  </td>
790
870
  <td>
791
- <pre class="code"><span class="info file"># File 'lib/csv_decision/table.rb', line 56</span>
871
+ <pre class="code"><span class="info file"># File 'lib/csv_decision/table.rb', line 53</span>
792
872
 
793
873
  <span class='kw'>def</span> <span class='id identifier rubyid_outs_rows'>outs_rows</span>
794
874
  <span class='ivar'>@outs_rows</span>
@@ -848,12 +928,12 @@ and last row index given.</p>
848
928
  <pre class="lines">
849
929
 
850
930
 
851
- 47
852
- 48
853
- 49</pre>
931
+ 44
932
+ 45
933
+ 46</pre>
854
934
  </td>
855
935
  <td>
856
- <pre class="code"><span class="info file"># File 'lib/csv_decision/table.rb', line 47</span>
936
+ <pre class="code"><span class="info file"># File 'lib/csv_decision/table.rb', line 44</span>
857
937
 
858
938
  <span class='kw'>def</span> <span class='id identifier rubyid_rows'>rows</span>
859
939
  <span class='ivar'>@rows</span>
@@ -913,12 +993,12 @@ and last row index given.</p>
913
993
  <pre class="lines">
914
994
 
915
995
 
916
- 52
917
- 53
918
- 54</pre>
996
+ 49
997
+ 50
998
+ 51</pre>
919
999
  </td>
920
1000
  <td>
921
- <pre class="code"><span class="info file"># File 'lib/csv_decision/table.rb', line 52</span>
1001
+ <pre class="code"><span class="info file"># File 'lib/csv_decision/table.rb', line 49</span>
922
1002
 
923
1003
  <span class='kw'>def</span> <span class='id identifier rubyid_scan_rows'>scan_rows</span>
924
1004
  <span class='ivar'>@scan_rows</span>
@@ -1181,17 +1261,17 @@ and last row index given.</p>
1181
1261
  <pre class="lines">
1182
1262
 
1183
1263
 
1184
- 69
1185
1264
  70
1186
1265
  71
1187
1266
  72
1188
1267
  73
1189
1268
  74
1190
1269
  75
1191
- 76</pre>
1270
+ 76
1271
+ 77</pre>
1192
1272
  </td>
1193
1273
  <td>
1194
- <pre class="code"><span class="info file"># File 'lib/csv_decision/table.rb', line 69</span>
1274
+ <pre class="code"><span class="info file"># File 'lib/csv_decision/table.rb', line 70</span>
1195
1275
 
1196
1276
  <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>
1197
1277
  <span class='id identifier rubyid_index'>index</span> <span class='op'>=</span> <span class='id identifier rubyid_first'>first</span>
@@ -1211,9 +1291,9 @@ and last row index given.</p>
1211
1291
  </div>
1212
1292
 
1213
1293
  <div id="footer">
1214
- Generated on Sat Dec 30 13:04:05 2017 by
1294
+ Generated on Fri Jan 5 21:44:00 2018 by
1215
1295
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1216
- 0.9.12 (ruby-2.3.0).
1296
+ 0.9.12 (ruby-2.4.0).
1217
1297
  </div>
1218
1298
 
1219
1299
  </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/input.rb,<br /> lib/csv_decision/parse.rb,<br /> lib/csv_decision/table.rb,<br /> lib/csv_decision/decide.rb,<br /> lib/csv_decision/header.rb,<br /> lib/csv_decision/columns.rb,<br /> lib/csv_decision/options.rb,<br /> lib/csv_decision/decision.rb,<br /> lib/csv_decision/matchers.rb,<br /> lib/csv_decision/scan_row.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>
82
+ lib/csv_decision/data.rb,<br /> lib/csv_decision/load.rb,<br /> lib/csv_decision/input.rb,<br /> lib/csv_decision/parse.rb,<br /> lib/csv_decision/table.rb,<br /> lib/csv_decision/decide.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/matchers.rb,<br /> lib/csv_decision/scan_row.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/Decide.html" title="CSVDecision::Decide (module)">Decide</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>
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/Decide.html" title="CSVDecision::Decide (module)">Decide</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>
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/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>
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>
125
125
 
126
126
 
127
127
  </p>
@@ -606,9 +606,9 @@ table.decide(topic: &#39;finance&#39;, region: &#39;Europe&#39;) #=&gt; team_mem
606
606
  </div>
607
607
 
608
608
  <div id="footer">
609
- Generated on Sat Dec 30 13:04:04 2017 by
609
+ Generated on Fri Jan 5 21:44:00 2018 by
610
610
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
611
- 0.9.12 (ruby-2.3.0).
611
+ 0.9.12 (ruby-2.4.0).
612
612
  </div>
613
613
 
614
614
  </div>