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
@@ -132,6 +132,81 @@
|
|
132
132
|
|
133
133
|
|
134
134
|
|
135
|
+
<h2>
|
136
|
+
Class Method Summary
|
137
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
138
|
+
</h2>
|
139
|
+
|
140
|
+
<ul class="summary">
|
141
|
+
|
142
|
+
<li class="public ">
|
143
|
+
<span class="summary_signature">
|
144
|
+
|
145
|
+
<a href="#ins_cell_dictionary-class_method" title="ins_cell_dictionary (class method)">.<strong>ins_cell_dictionary</strong>(columns:, cell:) ⇒ void </a>
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
</span>
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
<span class="private note title">private</span>
|
157
|
+
|
158
|
+
|
159
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
160
|
+
|
161
|
+
</li>
|
162
|
+
|
163
|
+
|
164
|
+
<li class="public ">
|
165
|
+
<span class="summary_signature">
|
166
|
+
|
167
|
+
<a href="#ins_dictionary-class_method" title="ins_dictionary (class method)">.<strong>ins_dictionary</strong>(columns:, row:) ⇒ void </a>
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
</span>
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
<span class="private note title">private</span>
|
179
|
+
|
180
|
+
|
181
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
182
|
+
|
183
|
+
</li>
|
184
|
+
|
185
|
+
|
186
|
+
<li class="public ">
|
187
|
+
<span class="summary_signature">
|
188
|
+
|
189
|
+
<a href="#outs_dictionary-class_method" title="outs_dictionary (class method)">.<strong>outs_dictionary</strong>(columns:, row:) ⇒ void </a>
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
</span>
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
<span class="private note title">private</span>
|
201
|
+
|
202
|
+
|
203
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
204
|
+
|
205
|
+
</li>
|
206
|
+
|
207
|
+
|
208
|
+
</ul>
|
209
|
+
|
135
210
|
<h2>
|
136
211
|
Instance Method Summary
|
137
212
|
<small><a href="#" class="summary_toggle">collapse</a></small>
|
@@ -382,6 +457,19 @@
|
|
382
457
|
|
383
458
|
</ul>
|
384
459
|
|
460
|
+
<p class="tag_title">Raises:</p>
|
461
|
+
<ul class="raise">
|
462
|
+
|
463
|
+
<li>
|
464
|
+
|
465
|
+
|
466
|
+
<span class='type'>(<tt><span class='object_link'><a href="TableValidationError.html" title="CSVDecision::TableValidationError (class)">TableValidationError</a></span></tt>)</span>
|
467
|
+
|
468
|
+
|
469
|
+
|
470
|
+
</li>
|
471
|
+
|
472
|
+
</ul>
|
385
473
|
|
386
474
|
</div><table class="source_code">
|
387
475
|
<tr>
|
@@ -389,27 +477,33 @@
|
|
389
477
|
<pre class="lines">
|
390
478
|
|
391
479
|
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
480
|
+
167
|
481
|
+
168
|
482
|
+
169
|
483
|
+
170
|
484
|
+
171
|
485
|
+
172
|
486
|
+
173
|
487
|
+
174
|
488
|
+
175
|
489
|
+
176
|
490
|
+
177
|
491
|
+
178
|
492
|
+
179</pre>
|
402
493
|
</td>
|
403
494
|
<td>
|
404
|
-
<pre class="code"><span class="info file"># File 'lib/csv_decision/columns.rb', line
|
495
|
+
<pre class="code"><span class="info file"># File 'lib/csv_decision/columns.rb', line 167</span>
|
405
496
|
|
406
497
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_table'>table</span><span class='rparen'>)</span>
|
407
498
|
<span class='comment'># If a column does not have a valid header cell, then it's empty of data.
|
408
499
|
</span> <span class='comment'># Return the stripped header row, and remove it from the data array.
|
409
500
|
</span> <span class='id identifier rubyid_row'>row</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="Header.html" title="CSVDecision::Header (module)">Header</a></span></span><span class='period'>.</span><span class='id identifier rubyid_strip_empty_columns'><span class='object_link'><a href="Header.html#strip_empty_columns-class_method" title="CSVDecision::Header.strip_empty_columns (method)">strip_empty_columns</a></span></span><span class='lparen'>(</span><span class='label'>rows:</span> <span class='id identifier rubyid_table'>table</span><span class='period'>.</span><span class='id identifier rubyid_rows'>rows</span><span class='rparen'>)</span>
|
410
501
|
|
502
|
+
<span class='comment'># No header row found?
|
503
|
+
</span> <span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="TableValidationError.html" title="CSVDecision::TableValidationError (class)">TableValidationError</a></span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>table has no header row</span><span class='tstring_end'>'</span></span> <span class='kw'>unless</span> <span class='id identifier rubyid_row'>row</span>
|
504
|
+
|
411
505
|
<span class='comment'># Build a dictionary of all valid data columns from the header row.
|
412
|
-
</span> <span class='ivar'>@dictionary</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../CSVDecision.html" title="CSVDecision (module)">CSVDecision</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Dictionary.html" title="CSVDecision::Dictionary (module)">Dictionary</a></span></span><span class='period'>.</span><span class='id identifier rubyid_build'><span class='object_link'><a href="Dictionary.html#build-class_method" title="CSVDecision::Dictionary.build (method)">build</a></span></span><span class='lparen'>(</span><span class='label'>header:</span> <span class='id identifier rubyid_row'>row</span><span class='comma'>,</span> <span class='label'>dictionary:</span> <span class='const'><span class='object_link'><a href="Columns/Dictionary.html" title="CSVDecision::Columns::Dictionary (class)">Dictionary</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Columns/Dictionary.html#initialize-instance_method" title="CSVDecision::Columns::Dictionary#initialize (method)">new</a></span></span><span class='rparen'>)</span>
|
506
|
+
</span> <span class='ivar'>@dictionary</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../CSVDecision.html" title="CSVDecision (module)">CSVDecision</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Dictionary.html" title="CSVDecision::Dictionary (module)">Dictionary</a></span></span><span class='period'>.</span><span class='id identifier rubyid_build'><span class='object_link'><a href="Dictionary.html#build-class_method" title="CSVDecision::Dictionary.build (method)">build</a></span></span><span class='lparen'>(</span><span class='label'>header:</span> <span class='id identifier rubyid_row'>row</span><span class='comma'>,</span> <span class='label'>dictionary:</span> <span class='const'><span class='object_link'><a href="Columns/Dictionary.html" title="CSVDecision::Columns::Dictionary (class)">Dictionary</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Columns/Dictionary.html#initialize-instance_method" title="CSVDecision::Columns::Dictionary#initialize (method)">new</a></span></span><span class='rparen'>)</span>
|
413
507
|
|
414
508
|
<span class='id identifier rubyid_freeze'>freeze</span>
|
415
509
|
<span class='kw'>end</span></pre>
|
@@ -421,6 +515,259 @@
|
|
421
515
|
</div>
|
422
516
|
|
423
517
|
|
518
|
+
<div id="class_method_details" class="method_details_list">
|
519
|
+
<h2>Class Method Details</h2>
|
520
|
+
|
521
|
+
|
522
|
+
<div class="method_details first">
|
523
|
+
<h3 class="signature first" id="ins_cell_dictionary-class_method">
|
524
|
+
|
525
|
+
.<strong>ins_cell_dictionary</strong>(columns:, cell:) ⇒ <tt>void</tt>
|
526
|
+
|
527
|
+
|
528
|
+
|
529
|
+
|
530
|
+
|
531
|
+
</h3><div class="docstring">
|
532
|
+
<div class="discussion">
|
533
|
+
<p class="note private">
|
534
|
+
<strong>This method is part of a private API.</strong>
|
535
|
+
You should avoid using this method if possible, as it may be removed or be changed in the future.
|
536
|
+
</p>
|
537
|
+
<p class="note returns_void">This method returns an undefined value.</p>
|
538
|
+
|
539
|
+
</div>
|
540
|
+
</div>
|
541
|
+
<div class="tags">
|
542
|
+
<p class="tag_title">Parameters:</p>
|
543
|
+
<ul class="param">
|
544
|
+
|
545
|
+
<li>
|
546
|
+
|
547
|
+
<span class='name'>columns</span>
|
548
|
+
|
549
|
+
|
550
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="CSVDecision::Columns (class)">CSVDecision::Columns</a></span></tt>)</span>
|
551
|
+
|
552
|
+
|
553
|
+
|
554
|
+
—
|
555
|
+
<div class='inline'>
|
556
|
+
<p>Table's columns dictionary.</p>
|
557
|
+
</div>
|
558
|
+
|
559
|
+
</li>
|
560
|
+
|
561
|
+
<li>
|
562
|
+
|
563
|
+
<span class='name'>cell</span>
|
564
|
+
|
565
|
+
|
566
|
+
<span class='type'>(<tt>Object</tt>)</span>
|
567
|
+
|
568
|
+
|
569
|
+
|
570
|
+
—
|
571
|
+
<div class='inline'>
|
572
|
+
<p>Data row cell.</p>
|
573
|
+
</div>
|
574
|
+
|
575
|
+
</li>
|
576
|
+
|
577
|
+
</ul>
|
578
|
+
|
579
|
+
|
580
|
+
</div><table class="source_code">
|
581
|
+
<tr>
|
582
|
+
<td>
|
583
|
+
<pre class="lines">
|
584
|
+
|
585
|
+
|
586
|
+
30
|
587
|
+
31
|
588
|
+
32
|
589
|
+
33
|
590
|
+
34
|
591
|
+
35</pre>
|
592
|
+
</td>
|
593
|
+
<td>
|
594
|
+
<pre class="code"><span class="info file"># File 'lib/csv_decision/columns.rb', line 30</span>
|
595
|
+
|
596
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_ins_cell_dictionary'>ins_cell_dictionary</span><span class='lparen'>(</span><span class='label'>columns:</span><span class='comma'>,</span> <span class='label'>cell:</span><span class='rparen'>)</span>
|
597
|
+
<span class='kw'>return</span> <span class='kw'>unless</span> <span class='id identifier rubyid_cell'>cell</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="Matchers.html" title="CSVDecision::Matchers (class)">Matchers</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Matchers/Proc.html" title="CSVDecision::Matchers::Proc (class)">Proc</a></span></span><span class='rparen'>)</span>
|
598
|
+
<span class='kw'>return</span> <span class='kw'>if</span> <span class='id identifier rubyid_cell'>cell</span><span class='period'>.</span><span class='id identifier rubyid_symbols'>symbols</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
599
|
+
|
600
|
+
<span class='id identifier rubyid_add_ins_symbols'>add_ins_symbols</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'>cell:</span> <span class='id identifier rubyid_cell'>cell</span><span class='rparen'>)</span>
|
601
|
+
<span class='kw'>end</span></pre>
|
602
|
+
</td>
|
603
|
+
</tr>
|
604
|
+
</table>
|
605
|
+
</div>
|
606
|
+
|
607
|
+
<div class="method_details ">
|
608
|
+
<h3 class="signature " id="ins_dictionary-class_method">
|
609
|
+
|
610
|
+
.<strong>ins_dictionary</strong>(columns:, row:) ⇒ <tt>void</tt>
|
611
|
+
|
612
|
+
|
613
|
+
|
614
|
+
|
615
|
+
|
616
|
+
</h3><div class="docstring">
|
617
|
+
<div class="discussion">
|
618
|
+
<p class="note private">
|
619
|
+
<strong>This method is part of a private API.</strong>
|
620
|
+
You should avoid using this method if possible, as it may be removed or be changed in the future.
|
621
|
+
</p>
|
622
|
+
<p class="note returns_void">This method returns an undefined value.</p>
|
623
|
+
|
624
|
+
</div>
|
625
|
+
</div>
|
626
|
+
<div class="tags">
|
627
|
+
<p class="tag_title">Parameters:</p>
|
628
|
+
<ul class="param">
|
629
|
+
|
630
|
+
<li>
|
631
|
+
|
632
|
+
<span class='name'>columns</span>
|
633
|
+
|
634
|
+
|
635
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="CSVDecision::Columns (class)">CSVDecision::Columns</a></span></tt>)</span>
|
636
|
+
|
637
|
+
|
638
|
+
|
639
|
+
—
|
640
|
+
<div class='inline'>
|
641
|
+
<p>Table's columns dictionary.</p>
|
642
|
+
</div>
|
643
|
+
|
644
|
+
</li>
|
645
|
+
|
646
|
+
<li>
|
647
|
+
|
648
|
+
<span class='name'>row</span>
|
649
|
+
|
650
|
+
|
651
|
+
<span class='type'>(<tt>Array</tt>)</span>
|
652
|
+
|
653
|
+
|
654
|
+
|
655
|
+
—
|
656
|
+
<div class='inline'>
|
657
|
+
<p>Data row.</p>
|
658
|
+
</div>
|
659
|
+
|
660
|
+
</li>
|
661
|
+
|
662
|
+
</ul>
|
663
|
+
|
664
|
+
|
665
|
+
</div><table class="source_code">
|
666
|
+
<tr>
|
667
|
+
<td>
|
668
|
+
<pre class="lines">
|
669
|
+
|
670
|
+
|
671
|
+
23
|
672
|
+
24
|
673
|
+
25</pre>
|
674
|
+
</td>
|
675
|
+
<td>
|
676
|
+
<pre class="code"><span class="info file"># File 'lib/csv_decision/columns.rb', line 23</span>
|
677
|
+
|
678
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_ins_dictionary'>ins_dictionary</span><span class='lparen'>(</span><span class='label'>columns:</span><span class='comma'>,</span> <span class='label'>row:</span><span class='rparen'>)</span>
|
679
|
+
<span class='id identifier rubyid_row'>row</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_cell'>cell</span><span class='op'>|</span> <span class='id identifier rubyid_ins_cell_dictionary'>ins_cell_dictionary</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'>cell:</span> <span class='id identifier rubyid_cell'>cell</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
|
680
|
+
<span class='kw'>end</span></pre>
|
681
|
+
</td>
|
682
|
+
</tr>
|
683
|
+
</table>
|
684
|
+
</div>
|
685
|
+
|
686
|
+
<div class="method_details ">
|
687
|
+
<h3 class="signature " id="outs_dictionary-class_method">
|
688
|
+
|
689
|
+
.<strong>outs_dictionary</strong>(columns:, row:) ⇒ <tt>void</tt>
|
690
|
+
|
691
|
+
|
692
|
+
|
693
|
+
|
694
|
+
|
695
|
+
</h3><div class="docstring">
|
696
|
+
<div class="discussion">
|
697
|
+
<p class="note private">
|
698
|
+
<strong>This method is part of a private API.</strong>
|
699
|
+
You should avoid using this method if possible, as it may be removed or be changed in the future.
|
700
|
+
</p>
|
701
|
+
<p class="note returns_void">This method returns an undefined value.</p>
|
702
|
+
|
703
|
+
</div>
|
704
|
+
</div>
|
705
|
+
<div class="tags">
|
706
|
+
<p class="tag_title">Parameters:</p>
|
707
|
+
<ul class="param">
|
708
|
+
|
709
|
+
<li>
|
710
|
+
|
711
|
+
<span class='name'>columns</span>
|
712
|
+
|
713
|
+
|
714
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="CSVDecision::Columns (class)">CSVDecision::Columns</a></span></tt>)</span>
|
715
|
+
|
716
|
+
|
717
|
+
|
718
|
+
—
|
719
|
+
<div class='inline'>
|
720
|
+
<p>Table's columns dictionary.</p>
|
721
|
+
</div>
|
722
|
+
|
723
|
+
</li>
|
724
|
+
|
725
|
+
<li>
|
726
|
+
|
727
|
+
<span class='name'>row</span>
|
728
|
+
|
729
|
+
|
730
|
+
<span class='type'>(<tt>Array</tt>)</span>
|
731
|
+
|
732
|
+
|
733
|
+
|
734
|
+
—
|
735
|
+
<div class='inline'>
|
736
|
+
<p>Data row.</p>
|
737
|
+
</div>
|
738
|
+
|
739
|
+
</li>
|
740
|
+
|
741
|
+
</ul>
|
742
|
+
|
743
|
+
|
744
|
+
</div><table class="source_code">
|
745
|
+
<tr>
|
746
|
+
<td>
|
747
|
+
<pre class="lines">
|
748
|
+
|
749
|
+
|
750
|
+
14
|
751
|
+
15
|
752
|
+
16
|
753
|
+
17
|
754
|
+
18</pre>
|
755
|
+
</td>
|
756
|
+
<td>
|
757
|
+
<pre class="code"><span class="info file"># File 'lib/csv_decision/columns.rb', line 14</span>
|
758
|
+
|
759
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_outs_dictionary'>outs_dictionary</span><span class='lparen'>(</span><span class='label'>columns:</span><span class='comma'>,</span> <span class='label'>row:</span><span class='rparen'>)</span>
|
760
|
+
<span class='id identifier rubyid_row'>row</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>
|
761
|
+
<span class='id identifier rubyid_outs_check_cell'>outs_check_cell</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'>cell:</span> <span class='id identifier rubyid_cell'>cell</span><span class='comma'>,</span> <span class='label'>index:</span> <span class='id identifier rubyid_index'>index</span><span class='rparen'>)</span>
|
762
|
+
<span class='kw'>end</span>
|
763
|
+
<span class='kw'>end</span></pre>
|
764
|
+
</td>
|
765
|
+
</tr>
|
766
|
+
</table>
|
767
|
+
</div>
|
768
|
+
|
769
|
+
</div>
|
770
|
+
|
424
771
|
<div id="instance_method_details" class="method_details_list">
|
425
772
|
<h2>Instance Method Details</h2>
|
426
773
|
|
@@ -455,12 +802,12 @@
|
|
455
802
|
<pre class="lines">
|
456
803
|
|
457
804
|
|
458
|
-
|
459
|
-
|
460
|
-
|
805
|
+
128
|
806
|
+
129
|
807
|
+
130</pre>
|
461
808
|
</td>
|
462
809
|
<td>
|
463
|
-
<pre class="code"><span class="info file"># File 'lib/csv_decision/columns.rb', line
|
810
|
+
<pre class="code"><span class="info file"># File 'lib/csv_decision/columns.rb', line 128</span>
|
464
811
|
|
465
812
|
<span class='kw'>def</span> <span class='id identifier rubyid_defaults'>defaults</span>
|
466
813
|
<span class='ivar'>@dictionary</span><span class='op'>&.</span><span class='id identifier rubyid_defaults'>defaults</span>
|
@@ -500,12 +847,12 @@
|
|
500
847
|
<pre class="lines">
|
501
848
|
|
502
849
|
|
503
|
-
|
504
|
-
|
505
|
-
|
850
|
+
133
|
851
|
+
134
|
852
|
+
135</pre>
|
506
853
|
</td>
|
507
854
|
<td>
|
508
|
-
<pre class="code"><span class="info file"># File 'lib/csv_decision/columns.rb', line
|
855
|
+
<pre class="code"><span class="info file"># File 'lib/csv_decision/columns.rb', line 133</span>
|
509
856
|
|
510
857
|
<span class='kw'>def</span> <span class='id identifier rubyid_defaults='>defaults=</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
|
511
858
|
<span class='ivar'>@dictionary</span><span class='period'>.</span><span class='id identifier rubyid_defaults'>defaults</span> <span class='op'>=</span> <span class='id identifier rubyid_value'>value</span>
|
@@ -563,12 +910,12 @@
|
|
563
910
|
<pre class="lines">
|
564
911
|
|
565
912
|
|
566
|
-
|
567
|
-
|
568
|
-
|
913
|
+
139
|
914
|
+
140
|
915
|
+
141</pre>
|
569
916
|
</td>
|
570
917
|
<td>
|
571
|
-
<pre class="code"><span class="info file"># File 'lib/csv_decision/columns.rb', line
|
918
|
+
<pre class="code"><span class="info file"># File 'lib/csv_decision/columns.rb', line 139</span>
|
572
919
|
|
573
920
|
<span class='kw'>def</span> <span class='id identifier rubyid_dictionary'>dictionary</span>
|
574
921
|
<span class='ivar'>@dictionary</span><span class='period'>.</span><span class='id identifier rubyid_columns'>columns</span>
|
@@ -581,7 +928,7 @@
|
|
581
928
|
<div class="method_details ">
|
582
929
|
<h3 class="signature " id="ifs-instance_method">
|
583
930
|
|
584
|
-
#<strong>ifs</strong> ⇒ <tt>Hash{Index
|
931
|
+
#<strong>ifs</strong> ⇒ <tt>Hash{<span class='object_link'><a href="Index.html" title="CSVDecision::Index (class)">Index</a></span>=>Entry}</tt>
|
585
932
|
|
586
933
|
|
587
934
|
|
@@ -607,7 +954,7 @@
|
|
607
954
|
<li>
|
608
955
|
|
609
956
|
|
610
|
-
<span class='type'>(<tt>Hash{Index
|
957
|
+
<span class='type'>(<tt>Hash{<span class='object_link'><a href="Index.html" title="CSVDecision::Index (class)">Index</a></span>=>Entry}</tt>)</span>
|
611
958
|
|
612
959
|
|
613
960
|
|
@@ -621,12 +968,12 @@
|
|
621
968
|
<pre class="lines">
|
622
969
|
|
623
970
|
|
624
|
-
|
625
|
-
|
626
|
-
|
971
|
+
157
|
972
|
+
158
|
973
|
+
159</pre>
|
627
974
|
</td>
|
628
975
|
<td>
|
629
|
-
<pre class="code"><span class="info file"># File 'lib/csv_decision/columns.rb', line
|
976
|
+
<pre class="code"><span class="info file"># File 'lib/csv_decision/columns.rb', line 157</span>
|
630
977
|
|
631
978
|
<span class='kw'>def</span> <span class='id identifier rubyid_ifs'>ifs</span>
|
632
979
|
<span class='ivar'>@dictionary</span><span class='period'>.</span><span class='id identifier rubyid_ifs'>ifs</span>
|
@@ -684,12 +1031,12 @@
|
|
684
1031
|
<pre class="lines">
|
685
1032
|
|
686
1033
|
|
687
|
-
|
688
|
-
|
689
|
-
|
1034
|
+
162
|
1035
|
+
163
|
1036
|
+
164</pre>
|
690
1037
|
</td>
|
691
1038
|
<td>
|
692
|
-
<pre class="code"><span class="info file"># File 'lib/csv_decision/columns.rb', line
|
1039
|
+
<pre class="code"><span class="info file"># File 'lib/csv_decision/columns.rb', line 162</span>
|
693
1040
|
|
694
1041
|
<span class='kw'>def</span> <span class='id identifier rubyid_input_keys'>input_keys</span>
|
695
1042
|
<span class='ivar'>@dictionary</span><span class='period'>.</span><span class='id identifier rubyid_columns'>columns</span><span class='period'>.</span><span class='id identifier rubyid_select'>select</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid__k'>_k</span><span class='comma'>,</span> <span class='id identifier rubyid_v'>v</span><span class='op'>|</span> <span class='id identifier rubyid_v'>v</span> <span class='op'>==</span> <span class='symbol'>:in</span> <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_keys'>keys</span>
|
@@ -702,7 +1049,7 @@
|
|
702
1049
|
<div class="method_details ">
|
703
1050
|
<h3 class="signature " id="ins-instance_method">
|
704
1051
|
|
705
|
-
#<strong>ins</strong> ⇒ <tt>Hash{Index
|
1052
|
+
#<strong>ins</strong> ⇒ <tt>Hash{<span class='object_link'><a href="Index.html" title="CSVDecision::Index (class)">Index</a></span>=>Entry}</tt>
|
706
1053
|
|
707
1054
|
|
708
1055
|
|
@@ -728,7 +1075,7 @@
|
|
728
1075
|
<li>
|
729
1076
|
|
730
1077
|
|
731
|
-
<span class='type'>(<tt>Hash{Index
|
1078
|
+
<span class='type'>(<tt>Hash{<span class='object_link'><a href="Index.html" title="CSVDecision::Index (class)">Index</a></span>=>Entry}</tt>)</span>
|
732
1079
|
|
733
1080
|
|
734
1081
|
|
@@ -742,12 +1089,12 @@
|
|
742
1089
|
<pre class="lines">
|
743
1090
|
|
744
1091
|
|
745
|
-
|
746
|
-
|
747
|
-
|
1092
|
+
145
|
1093
|
+
146
|
1094
|
+
147</pre>
|
748
1095
|
</td>
|
749
1096
|
<td>
|
750
|
-
<pre class="code"><span class="info file"># File 'lib/csv_decision/columns.rb', line
|
1097
|
+
<pre class="code"><span class="info file"># File 'lib/csv_decision/columns.rb', line 145</span>
|
751
1098
|
|
752
1099
|
<span class='kw'>def</span> <span class='id identifier rubyid_ins'>ins</span>
|
753
1100
|
<span class='ivar'>@dictionary</span><span class='period'>.</span><span class='id identifier rubyid_ins'>ins</span>
|
@@ -760,7 +1107,7 @@
|
|
760
1107
|
<div class="method_details ">
|
761
1108
|
<h3 class="signature " id="outs-instance_method">
|
762
1109
|
|
763
|
-
#<strong>outs</strong> ⇒ <tt>Hash{Index
|
1110
|
+
#<strong>outs</strong> ⇒ <tt>Hash{<span class='object_link'><a href="Index.html" title="CSVDecision::Index (class)">Index</a></span>=>Entry}</tt>
|
764
1111
|
|
765
1112
|
|
766
1113
|
|
@@ -786,7 +1133,7 @@
|
|
786
1133
|
<li>
|
787
1134
|
|
788
1135
|
|
789
|
-
<span class='type'>(<tt>Hash{Index
|
1136
|
+
<span class='type'>(<tt>Hash{<span class='object_link'><a href="Index.html" title="CSVDecision::Index (class)">Index</a></span>=>Entry}</tt>)</span>
|
790
1137
|
|
791
1138
|
|
792
1139
|
|
@@ -800,12 +1147,12 @@
|
|
800
1147
|
<pre class="lines">
|
801
1148
|
|
802
1149
|
|
803
|
-
|
804
|
-
|
805
|
-
|
1150
|
+
151
|
1151
|
+
152
|
1152
|
+
153</pre>
|
806
1153
|
</td>
|
807
1154
|
<td>
|
808
|
-
<pre class="code"><span class="info file"># File 'lib/csv_decision/columns.rb', line
|
1155
|
+
<pre class="code"><span class="info file"># File 'lib/csv_decision/columns.rb', line 151</span>
|
809
1156
|
|
810
1157
|
<span class='kw'>def</span> <span class='id identifier rubyid_outs'>outs</span>
|
811
1158
|
<span class='ivar'>@dictionary</span><span class='op'>&.</span><span class='id identifier rubyid_outs'>outs</span>
|
@@ -820,7 +1167,7 @@
|
|
820
1167
|
</div>
|
821
1168
|
|
822
1169
|
<div id="footer">
|
823
|
-
Generated on Sat Jan
|
1170
|
+
Generated on Sat Jan 20 15:44:35 2018 by
|
824
1171
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
825
1172
|
0.9.12 (ruby-2.4.0).
|
826
1173
|
</div>
|
data/doc/CSVDecision/Data.html
CHANGED
@@ -308,7 +308,7 @@ array of arrays.</p>
|
|
308
308
|
<span class='name'>empty_columns</span>
|
309
309
|
|
310
310
|
|
311
|
-
<span class='type'>(<tt>Array<
|
311
|
+
<span class='type'>(<tt>Array<<span class='object_link'><a href="Index.html" title="CSVDecision::Index (class)">Index</a></span>></tt>)</span>
|
312
312
|
|
313
313
|
|
314
314
|
|
@@ -469,7 +469,7 @@ array of arrays. Strips out empty columns/rows and comment cells.</p>
|
|
469
469
|
</div>
|
470
470
|
|
471
471
|
<div id="footer">
|
472
|
-
Generated on Sat Jan
|
472
|
+
Generated on Sat Jan 20 15:44:34 2018 by
|
473
473
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
474
474
|
0.9.12 (ruby-2.4.0).
|
475
475
|
</div>
|