csv_decision 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- 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
@@ -174,6 +174,33 @@ it only contains constants.</p>
|
|
174
174
|
default value.</p>
|
175
175
|
</div></span>
|
176
176
|
|
177
|
+
</li>
|
178
|
+
|
179
|
+
|
180
|
+
<li class="public ">
|
181
|
+
<span class="summary_signature">
|
182
|
+
|
183
|
+
<a href="#indexed-instance_method" title="#indexed (instance method)">#<strong>indexed</strong> ⇒ Boolean </a>
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
</span>
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
<span class="private note title">private</span>
|
198
|
+
|
199
|
+
|
200
|
+
<span class="summary_desc"><div class='inline'>
|
201
|
+
<p>Returns true if this column is indexed.</p>
|
202
|
+
</div></span>
|
203
|
+
|
177
204
|
</li>
|
178
205
|
|
179
206
|
|
@@ -296,7 +323,7 @@ default value.</p>
|
|
296
323
|
|
297
324
|
<span class="summary_desc"><div class='inline'>
|
298
325
|
<p>Create a new column dictionary entry defaulting attributes from the column
|
299
|
-
type, which is looked up in
|
326
|
+
type, which is looked up in the above table.</p>
|
300
327
|
</div></span>
|
301
328
|
|
302
329
|
</li>
|
@@ -314,7 +341,7 @@ type, which is looked up in <code>ENTRY</code> table.</p>
|
|
314
341
|
<li class="public ">
|
315
342
|
<span class="summary_signature">
|
316
343
|
|
317
|
-
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(name:, type:, eval: nil, set_if: nil) ⇒ Entry </a>
|
344
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(name:, type:, eval: nil, set_if: nil, indexed: nil) ⇒ Entry </a>
|
318
345
|
|
319
346
|
|
320
347
|
|
@@ -394,7 +421,7 @@ type, which is looked up in <code>ENTRY</code> table.</p>
|
|
394
421
|
<div class="method_details first">
|
395
422
|
<h3 class="signature first" id="initialize-instance_method">
|
396
423
|
|
397
|
-
#<strong>initialize</strong>(name:, type:, eval: nil, set_if: nil) ⇒ <tt><span class='object_link'><a href="" title="CSVDecision::Dictionary::Entry (class)">Entry</a></span></tt>
|
424
|
+
#<strong>initialize</strong>(name:, type:, eval: nil, set_if: nil, indexed: nil) ⇒ <tt><span class='object_link'><a href="" title="CSVDecision::Dictionary::Entry (class)">Entry</a></span></tt>
|
398
425
|
|
399
426
|
|
400
427
|
|
@@ -421,25 +448,27 @@ type, which is looked up in <code>ENTRY</code> table.</p>
|
|
421
448
|
<pre class="lines">
|
422
449
|
|
423
450
|
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
451
|
+
91
|
452
|
+
92
|
453
|
+
93
|
454
|
+
94
|
455
|
+
95
|
456
|
+
96
|
457
|
+
97
|
458
|
+
98
|
459
|
+
99</pre>
|
432
460
|
</td>
|
433
461
|
<td>
|
434
|
-
<pre class="code"><span class="info file"># File 'lib/csv_decision/dictionary.rb', line
|
462
|
+
<pre class="code"><span class="info file"># File 'lib/csv_decision/dictionary.rb', line 91</span>
|
435
463
|
|
436
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='label'>name:</span><span class='comma'>,</span> <span class='label'>type:</span><span class='comma'>,</span> <span class='label'>eval:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>set_if:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
464
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='label'>name:</span><span class='comma'>,</span> <span class='label'>type:</span><span class='comma'>,</span> <span class='label'>eval:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>set_if:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>indexed:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
437
465
|
<span class='ivar'>@name</span> <span class='op'>=</span> <span class='id identifier rubyid_name'>name</span>
|
438
466
|
<span class='ivar'>@type</span> <span class='op'>=</span> <span class='id identifier rubyid_type'>type</span>
|
439
467
|
<span class='ivar'>@eval</span> <span class='op'>=</span> <span class='id identifier rubyid_eval'>eval</span>
|
440
468
|
<span class='ivar'>@set_if</span> <span class='op'>=</span> <span class='id identifier rubyid_set_if'>set_if</span>
|
441
469
|
<span class='ivar'>@function</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
442
470
|
<span class='ivar'>@ins</span> <span class='op'>=</span> <span class='const'>INS_TYPES</span><span class='period'>.</span><span class='id identifier rubyid_member?'>member?</span><span class='lparen'>(</span><span class='id identifier rubyid_type'>type</span><span class='rparen'>)</span>
|
471
|
+
<span class='ivar'>@indexed</span> <span class='op'>=</span> <span class='id identifier rubyid_indexed'>indexed</span>
|
443
472
|
<span class='kw'>end</span></pre>
|
444
473
|
</td>
|
445
474
|
</tr>
|
@@ -503,12 +532,12 @@ it only contains constants.</p>
|
|
503
532
|
<pre class="lines">
|
504
533
|
|
505
534
|
|
506
|
-
|
507
|
-
|
508
|
-
|
535
|
+
75
|
536
|
+
76
|
537
|
+
77</pre>
|
509
538
|
</td>
|
510
539
|
<td>
|
511
|
-
<pre class="code"><span class="info file"># File 'lib/csv_decision/dictionary.rb', line
|
540
|
+
<pre class="code"><span class="info file"># File 'lib/csv_decision/dictionary.rb', line 75</span>
|
512
541
|
|
513
542
|
<span class='kw'>def</span> <span class='id identifier rubyid_eval'>eval</span>
|
514
543
|
<span class='ivar'>@eval</span>
|
@@ -570,12 +599,12 @@ default value. If not a proc, then it's some type of constant.</p>
|
|
570
599
|
<pre class="lines">
|
571
600
|
|
572
601
|
|
573
|
-
|
574
|
-
|
575
|
-
|
602
|
+
84
|
603
|
+
85
|
604
|
+
86</pre>
|
576
605
|
</td>
|
577
606
|
<td>
|
578
|
-
<pre class="code"><span class="info file"># File 'lib/csv_decision/dictionary.rb', line
|
607
|
+
<pre class="code"><span class="info file"># File 'lib/csv_decision/dictionary.rb', line 84</span>
|
579
608
|
|
580
609
|
<span class='kw'>def</span> <span class='id identifier rubyid_function'>function</span>
|
581
610
|
<span class='ivar'>@function</span>
|
@@ -586,6 +615,71 @@ default value. If not a proc, then it's some type of constant.</p>
|
|
586
615
|
</div>
|
587
616
|
|
588
617
|
|
618
|
+
<span id="indexed=-instance_method"></span>
|
619
|
+
<div class="method_details ">
|
620
|
+
<h3 class="signature " id="indexed-instance_method">
|
621
|
+
|
622
|
+
#<strong>indexed</strong> ⇒ <tt>Boolean</tt>
|
623
|
+
|
624
|
+
|
625
|
+
|
626
|
+
|
627
|
+
|
628
|
+
</h3><div class="docstring">
|
629
|
+
<div class="discussion">
|
630
|
+
<p class="note private">
|
631
|
+
<strong>This method is part of a private API.</strong>
|
632
|
+
You should avoid using this method if possible, as it may be removed or be changed in the future.
|
633
|
+
</p>
|
634
|
+
|
635
|
+
<p>Returns true if this column is indexed</p>
|
636
|
+
|
637
|
+
|
638
|
+
</div>
|
639
|
+
</div>
|
640
|
+
<div class="tags">
|
641
|
+
|
642
|
+
<p class="tag_title">Returns:</p>
|
643
|
+
<ul class="return">
|
644
|
+
|
645
|
+
<li>
|
646
|
+
|
647
|
+
|
648
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
649
|
+
|
650
|
+
|
651
|
+
|
652
|
+
—
|
653
|
+
<div class='inline'>
|
654
|
+
<p>Returns true if this column is indexed</p>
|
655
|
+
</div>
|
656
|
+
|
657
|
+
</li>
|
658
|
+
|
659
|
+
</ul>
|
660
|
+
|
661
|
+
</div><table class="source_code">
|
662
|
+
<tr>
|
663
|
+
<td>
|
664
|
+
<pre class="lines">
|
665
|
+
|
666
|
+
|
667
|
+
71
|
668
|
+
72
|
669
|
+
73</pre>
|
670
|
+
</td>
|
671
|
+
<td>
|
672
|
+
<pre class="code"><span class="info file"># File 'lib/csv_decision/dictionary.rb', line 71</span>
|
673
|
+
|
674
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_indexed'>indexed</span>
|
675
|
+
<span class='ivar'>@indexed</span>
|
676
|
+
<span class='kw'>end</span></pre>
|
677
|
+
</td>
|
678
|
+
</tr>
|
679
|
+
</table>
|
680
|
+
</div>
|
681
|
+
|
682
|
+
|
589
683
|
<span id=""></span>
|
590
684
|
<div class="method_details ">
|
591
685
|
<h3 class="signature " id="name-instance_method">
|
@@ -635,12 +729,12 @@ default value. If not a proc, then it's some type of constant.</p>
|
|
635
729
|
<pre class="lines">
|
636
730
|
|
637
731
|
|
638
|
-
|
639
|
-
|
640
|
-
|
732
|
+
65
|
733
|
+
66
|
734
|
+
67</pre>
|
641
735
|
</td>
|
642
736
|
<td>
|
643
|
-
<pre class="code"><span class="info file"># File 'lib/csv_decision/dictionary.rb', line
|
737
|
+
<pre class="code"><span class="info file"># File 'lib/csv_decision/dictionary.rb', line 65</span>
|
644
738
|
|
645
739
|
<span class='kw'>def</span> <span class='id identifier rubyid_name'>name</span>
|
646
740
|
<span class='ivar'>@name</span>
|
@@ -704,12 +798,12 @@ value that must evaluate to a truthy value.</p>
|
|
704
798
|
<pre class="lines">
|
705
799
|
|
706
800
|
|
707
|
-
|
708
|
-
|
709
|
-
|
801
|
+
80
|
802
|
+
81
|
803
|
+
82</pre>
|
710
804
|
</td>
|
711
805
|
<td>
|
712
|
-
<pre class="code"><span class="info file"># File 'lib/csv_decision/dictionary.rb', line
|
806
|
+
<pre class="code"><span class="info file"># File 'lib/csv_decision/dictionary.rb', line 80</span>
|
713
807
|
|
714
808
|
<span class='kw'>def</span> <span class='id identifier rubyid_set_if'>set_if</span>
|
715
809
|
<span class='ivar'>@set_if</span>
|
@@ -769,12 +863,12 @@ value that must evaluate to a truthy value.</p>
|
|
769
863
|
<pre class="lines">
|
770
864
|
|
771
865
|
|
772
|
-
|
773
|
-
|
774
|
-
|
866
|
+
68
|
867
|
+
69
|
868
|
+
70</pre>
|
775
869
|
</td>
|
776
870
|
<td>
|
777
|
-
<pre class="code"><span class="info file"># File 'lib/csv_decision/dictionary.rb', line
|
871
|
+
<pre class="code"><span class="info file"># File 'lib/csv_decision/dictionary.rb', line 68</span>
|
778
872
|
|
779
873
|
<span class='kw'>def</span> <span class='id identifier rubyid_type'>type</span>
|
780
874
|
<span class='ivar'>@type</span>
|
@@ -808,7 +902,7 @@ value that must evaluate to a truthy value.</p>
|
|
808
902
|
</p>
|
809
903
|
|
810
904
|
<p>Create a new column dictionary entry defaulting attributes from the column
|
811
|
-
type, which is looked up in
|
905
|
+
type, which is looked up in the above table.</p>
|
812
906
|
|
813
907
|
|
814
908
|
</div>
|
@@ -876,18 +970,26 @@ type, which is looked up in <code>ENTRY</code> table.</p>
|
|
876
970
|
<pre class="lines">
|
877
971
|
|
878
972
|
|
879
|
-
|
880
|
-
|
881
|
-
|
882
|
-
|
973
|
+
50
|
974
|
+
51
|
975
|
+
52
|
976
|
+
53
|
977
|
+
54
|
978
|
+
55
|
979
|
+
56
|
980
|
+
57</pre>
|
883
981
|
</td>
|
884
982
|
<td>
|
885
|
-
<pre class="code"><span class="info file"># File 'lib/csv_decision/dictionary.rb', line
|
983
|
+
<pre class="code"><span class="info file"># File 'lib/csv_decision/dictionary.rb', line 50</span>
|
886
984
|
|
887
985
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_create'>create</span><span class='lparen'>(</span><span class='label'>name:</span><span class='comma'>,</span> <span class='label'>type:</span><span class='rparen'>)</span>
|
888
986
|
<span class='id identifier rubyid_entry'>entry</span> <span class='op'>=</span> <span class='const'>ENTRY</span><span class='lbracket'>[</span><span class='id identifier rubyid_type'>type</span><span class='rbracket'>]</span>
|
889
|
-
<span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='label'>name:</span> <span class='id identifier rubyid_name'>name</span><span class='comma'>,</span>
|
890
|
-
<span class='
|
987
|
+
<span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='label'>name:</span> <span class='id identifier rubyid_name'>name</span><span class='comma'>,</span>
|
988
|
+
<span class='label'>eval:</span> <span class='id identifier rubyid_entry'>entry</span><span class='lbracket'>[</span><span class='symbol'>:eval</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='comment'># Set if the column requires functions evaluated
|
989
|
+
</span> <span class='label'>type:</span> <span class='id identifier rubyid_entry'>entry</span><span class='lbracket'>[</span><span class='symbol'>:type</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='comment'># Column type
|
990
|
+
</span> <span class='label'>set_if:</span> <span class='id identifier rubyid_entry'>entry</span><span class='lbracket'>[</span><span class='symbol'>:set_if</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='comment'># Set if the column has a conditional default
|
991
|
+
</span> <span class='label'>indexed:</span> <span class='id identifier rubyid_entry'>entry</span><span class='lbracket'>[</span><span class='symbol'>:type</span><span class='rbracket'>]</span> <span class='op'>!=</span> <span class='symbol'>:guard</span><span class='rparen'>)</span> <span class='comment'># A guard column cannot be indexed.
|
992
|
+
</span><span class='kw'>end</span></pre>
|
891
993
|
</td>
|
892
994
|
</tr>
|
893
995
|
</table>
|
@@ -947,12 +1049,12 @@ type, which is looked up in <code>ENTRY</code> table.</p>
|
|
947
1049
|
<pre class="lines">
|
948
1050
|
|
949
1051
|
|
950
|
-
|
951
|
-
|
952
|
-
|
1052
|
+
60
|
1053
|
+
61
|
1054
|
+
62</pre>
|
953
1055
|
</td>
|
954
1056
|
<td>
|
955
|
-
<pre class="code"><span class="info file"># File 'lib/csv_decision/dictionary.rb', line
|
1057
|
+
<pre class="code"><span class="info file"># File 'lib/csv_decision/dictionary.rb', line 60</span>
|
956
1058
|
|
957
1059
|
<span class='kw'>def</span> <span class='id identifier rubyid_ins?'>ins?</span>
|
958
1060
|
<span class='ivar'>@ins</span>
|
@@ -1005,17 +1107,17 @@ type, which is looked up in <code>ENTRY</code> table.</p>
|
|
1005
1107
|
<pre class="lines">
|
1006
1108
|
|
1007
1109
|
|
1008
|
-
|
1009
|
-
|
1010
|
-
|
1011
|
-
|
1012
|
-
|
1013
|
-
|
1014
|
-
|
1015
|
-
|
1110
|
+
104
|
1111
|
+
105
|
1112
|
+
106
|
1113
|
+
107
|
1114
|
+
108
|
1115
|
+
109
|
1116
|
+
110
|
1117
|
+
111</pre>
|
1016
1118
|
</td>
|
1017
1119
|
<td>
|
1018
|
-
<pre class="code"><span class="info file"># File 'lib/csv_decision/dictionary.rb', line
|
1120
|
+
<pre class="code"><span class="info file"># File 'lib/csv_decision/dictionary.rb', line 104</span>
|
1019
1121
|
|
1020
1122
|
<span class='kw'>def</span> <span class='id identifier rubyid_to_h'>to_h</span>
|
1021
1123
|
<span class='lbrace'>{</span>
|
@@ -1035,7 +1137,7 @@ type, which is looked up in <code>ENTRY</code> table.</p>
|
|
1035
1137
|
</div>
|
1036
1138
|
|
1037
1139
|
<div id="footer">
|
1038
|
-
Generated on Sat Jan
|
1140
|
+
Generated on Sat Jan 20 15:44:36 2018 by
|
1039
1141
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1040
1142
|
0.9.12 (ruby-2.4.0).
|
1041
1143
|
</div>
|
@@ -151,7 +151,7 @@ table load time.</p>
|
|
151
151
|
<li class="public ">
|
152
152
|
<span class="summary_signature">
|
153
153
|
|
154
|
-
<a href="#build-class_method" title="build (class method)">.<strong>build</strong>(header:, dictionary:) ⇒
|
154
|
+
<a href="#build-class_method" title="build (class method)">.<strong>build</strong>(header:, dictionary:) ⇒ Columns::Dictionary </a>
|
155
155
|
|
156
156
|
|
157
157
|
|
@@ -244,7 +244,7 @@ the header row.</p>
|
|
244
244
|
<span class='name'>out</span>
|
245
245
|
|
246
246
|
|
247
|
-
<span class='type'>(<tt>false</tt>, <tt>Index</tt>)</span>
|
247
|
+
<span class='type'>(<tt>false</tt>, <tt><span class='object_link'><a href="Index.html" title="CSVDecision::Index (class)">Index</a></span></tt>)</span>
|
248
248
|
|
249
249
|
|
250
250
|
|
@@ -282,15 +282,15 @@ the header row.</p>
|
|
282
282
|
<pre class="lines">
|
283
283
|
|
284
284
|
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
285
|
+
17
|
286
|
+
18
|
287
|
+
19
|
288
|
+
20
|
289
|
+
21
|
290
|
+
22</pre>
|
291
291
|
</td>
|
292
292
|
<td>
|
293
|
-
<pre class="code"><span class="info file"># File 'lib/csv_decision/dictionary.rb', line
|
293
|
+
<pre class="code"><span class="info file"># File 'lib/csv_decision/dictionary.rb', line 17</span>
|
294
294
|
|
295
295
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_add_name'>add_name</span><span class='lparen'>(</span><span class='label'>columns:</span><span class='comma'>,</span> <span class='label'>name:</span><span class='comma'>,</span> <span class='label'>out:</span> <span class='kw'>false</span><span class='rparen'>)</span>
|
296
296
|
<span class='const'><span class='object_link'><a href="Validate.html" title="CSVDecision::Validate (module)">Validate</a></span></span><span class='period'>.</span><span class='id identifier rubyid_name'><span class='object_link'><a href="Validate.html#name-class_method" title="CSVDecision::Validate.name (method)">name</a></span></span><span class='lparen'>(</span><span class='label'>columns:</span> <span class='id identifier rubyid_columns'>columns</span><span class='comma'>,</span> <span class='label'>name:</span> <span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='label'>out:</span> <span class='id identifier rubyid_out'>out</span><span class='rparen'>)</span>
|
@@ -306,7 +306,7 @@ the header row.</p>
|
|
306
306
|
<div class="method_details ">
|
307
307
|
<h3 class="signature " id="build-class_method">
|
308
308
|
|
309
|
-
.<strong>build</strong>(header:, dictionary:) ⇒ <tt>
|
309
|
+
.<strong>build</strong>(header:, dictionary:) ⇒ <tt><span class='object_link'><a href="Columns/Dictionary.html" title="CSVDecision::Columns::Dictionary (class)">Columns::Dictionary</a></span></tt>
|
310
310
|
|
311
311
|
|
312
312
|
|
@@ -341,6 +341,22 @@ the header row.</p>
|
|
341
341
|
—
|
342
342
|
<div class='inline'>
|
343
343
|
<p>The header row after removing any empty columns.</p>
|
344
|
+
</div>
|
345
|
+
|
346
|
+
</li>
|
347
|
+
|
348
|
+
<li>
|
349
|
+
|
350
|
+
<span class='name'>dictionary</span>
|
351
|
+
|
352
|
+
|
353
|
+
<span class='type'>(<tt><span class='object_link'><a href="Columns/Dictionary.html" title="CSVDecision::Columns::Dictionary (class)">Columns::Dictionary</a></span></tt>)</span>
|
354
|
+
|
355
|
+
|
356
|
+
|
357
|
+
—
|
358
|
+
<div class='inline'>
|
359
|
+
<p>Table's columns dictionary.</p>
|
344
360
|
</div>
|
345
361
|
|
346
362
|
</li>
|
@@ -353,13 +369,13 @@ the header row.</p>
|
|
353
369
|
<li>
|
354
370
|
|
355
371
|
|
356
|
-
<span class='type'>(<tt>
|
372
|
+
<span class='type'>(<tt><span class='object_link'><a href="Columns/Dictionary.html" title="CSVDecision::Columns::Dictionary (class)">Columns::Dictionary</a></span></tt>)</span>
|
357
373
|
|
358
374
|
|
359
375
|
|
360
376
|
—
|
361
377
|
<div class='inline'>
|
362
|
-
<p>
|
378
|
+
<p>Table's columns dictionary.</p>
|
363
379
|
</div>
|
364
380
|
|
365
381
|
</li>
|
@@ -372,16 +388,16 @@ the header row.</p>
|
|
372
388
|
<pre class="lines">
|
373
389
|
|
374
390
|
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
391
|
+
120
|
392
|
+
121
|
393
|
+
122
|
394
|
+
123
|
395
|
+
124
|
396
|
+
125
|
397
|
+
126</pre>
|
382
398
|
</td>
|
383
399
|
<td>
|
384
|
-
<pre class="code"><span class="info file"># File 'lib/csv_decision/dictionary.rb', line
|
400
|
+
<pre class="code"><span class="info file"># File 'lib/csv_decision/dictionary.rb', line 120</span>
|
385
401
|
|
386
402
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_build'>build</span><span class='lparen'>(</span><span class='label'>header:</span><span class='comma'>,</span> <span class='label'>dictionary:</span><span class='rparen'>)</span>
|
387
403
|
<span class='id identifier rubyid_header'>header</span><span class='period'>.</span><span class='id identifier rubyid_each_with_index'>each_with_index</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_cell'>cell</span><span class='comma'>,</span> <span class='id identifier rubyid_index'>index</span><span class='op'>|</span>
|
@@ -400,7 +416,7 @@ the header row.</p>
|
|
400
416
|
</div>
|
401
417
|
|
402
418
|
<div id="footer">
|
403
|
-
Generated on Sat Jan
|
419
|
+
Generated on Sat Jan 20 15:44:34 2018 by
|
404
420
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
405
421
|
0.9.12 (ruby-2.4.0).
|
406
422
|
</div>
|
data/doc/CSVDecision/Error.html
CHANGED
@@ -129,7 +129,7 @@
|
|
129
129
|
</div>
|
130
130
|
|
131
131
|
<div id="footer">
|
132
|
-
Generated on Sat Jan
|
132
|
+
Generated on Sat Jan 20 15:44:35 2018 by
|
133
133
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
134
134
|
0.9.12 (ruby-2.4.0).
|
135
135
|
</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>
|