csv_decision2 0.5.1 → 0.5.2

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 (102) hide show
  1. checksums.yaml +4 -4
  2. data/Dockerfile +1 -1
  3. data/README.md +16 -16
  4. data/benchmarks/rufus_decision.rb +5 -7
  5. data/csv_decision2.gemspec +2 -2
  6. data/doc/CSVDecision/CellValidationError.html +117 -110
  7. data/doc/CSVDecision/Columns/Default.html +537 -508
  8. data/doc/CSVDecision/Columns/Dictionary.html +729 -686
  9. data/doc/CSVDecision/Columns/Entry.html +457 -433
  10. data/doc/CSVDecision/Columns.html +1134 -1051
  11. data/doc/CSVDecision/Constant.html +205 -191
  12. data/doc/CSVDecision/Data.html +423 -398
  13. data/doc/CSVDecision/Decide.html +236 -225
  14. data/doc/CSVDecision/Decision.html +872 -825
  15. data/doc/CSVDecision/Defaults.html +243 -230
  16. data/doc/CSVDecision/Dictionary/Entry.html +1026 -964
  17. data/doc/CSVDecision/Dictionary.html +377 -355
  18. data/doc/CSVDecision/Error.html +116 -105
  19. data/doc/CSVDecision/FileError.html +117 -110
  20. data/doc/CSVDecision/Function.html +181 -168
  21. data/doc/CSVDecision/Guard.html +200 -185
  22. data/doc/CSVDecision/Header.html +557 -523
  23. data/doc/CSVDecision/Index.html +652 -617
  24. data/doc/CSVDecision/Input.html +329 -312
  25. data/doc/CSVDecision/Load.html +232 -220
  26. data/doc/CSVDecision/Matchers/Constant.html +432 -399
  27. data/doc/CSVDecision/Matchers/Function.html +451 -415
  28. data/doc/CSVDecision/Matchers/Guard.html +459 -424
  29. data/doc/CSVDecision/Matchers/Matcher.html +470 -426
  30. data/doc/CSVDecision/Matchers/Numeric.html +375 -346
  31. data/doc/CSVDecision/Matchers/Pattern.html +429 -396
  32. data/doc/CSVDecision/Matchers/Proc.html +617 -575
  33. data/doc/CSVDecision/Matchers/Range.html +331 -302
  34. data/doc/CSVDecision/Matchers/Symbol.html +386 -353
  35. data/doc/CSVDecision/Matchers.html +1509 -1393
  36. data/doc/CSVDecision/Numeric.html +201 -188
  37. data/doc/CSVDecision/Options.html +376 -357
  38. data/doc/CSVDecision/Parse.html +217 -204
  39. data/doc/CSVDecision/Paths.html +664 -629
  40. data/doc/CSVDecision/Result.html +1076 -1005
  41. data/doc/CSVDecision/Scan/InputHashes.html +305 -288
  42. data/doc/CSVDecision/Scan.html +262 -249
  43. data/doc/CSVDecision/ScanRow.html +749 -705
  44. data/doc/CSVDecision/Symbol.html +204 -191
  45. data/doc/CSVDecision/Table.html +1391 -1305
  46. data/doc/CSVDecision/TableValidationError.html +117 -110
  47. data/doc/CSVDecision/Validate.html +353 -337
  48. data/doc/CSVDecision.html +623 -552
  49. data/doc/_index.html +488 -448
  50. data/doc/class_list.html +250 -45
  51. data/doc/file.README.html +304 -278
  52. data/doc/index.html +304 -278
  53. data/doc/method_list.html +1159 -1017
  54. data/doc/top-level-namespace.html +79 -75
  55. data/lib/{csv_decision → csv_decision2}/columns.rb +7 -7
  56. data/lib/{csv_decision → csv_decision2}/data.rb +1 -1
  57. data/lib/{csv_decision → csv_decision2}/decision.rb +5 -5
  58. data/lib/{csv_decision → csv_decision2}/defaults.rb +2 -2
  59. data/lib/{csv_decision → csv_decision2}/dictionary.rb +2 -2
  60. data/lib/{csv_decision → csv_decision2}/header.rb +5 -5
  61. data/lib/{csv_decision → csv_decision2}/index.rb +5 -5
  62. data/lib/{csv_decision → csv_decision2}/input.rb +3 -3
  63. data/lib/{csv_decision → csv_decision2}/load.rb +6 -6
  64. data/lib/{csv_decision → csv_decision2}/matchers/constant.rb +2 -2
  65. data/lib/{csv_decision → csv_decision2}/matchers/function.rb +2 -2
  66. data/lib/{csv_decision → csv_decision2}/matchers/guard.rb +2 -2
  67. data/lib/{csv_decision → csv_decision2}/matchers/numeric.rb +2 -2
  68. data/lib/{csv_decision → csv_decision2}/matchers/pattern.rb +2 -2
  69. data/lib/{csv_decision → csv_decision2}/matchers/range.rb +2 -2
  70. data/lib/{csv_decision → csv_decision2}/matchers/symbol.rb +2 -2
  71. data/lib/{csv_decision → csv_decision2}/matchers.rb +5 -5
  72. data/lib/{csv_decision → csv_decision2}/options.rb +3 -3
  73. data/lib/{csv_decision → csv_decision2}/parse.rb +14 -14
  74. data/lib/{csv_decision → csv_decision2}/paths.rb +5 -5
  75. data/lib/{csv_decision → csv_decision2}/result.rb +2 -2
  76. data/lib/{csv_decision → csv_decision2}/scan.rb +3 -3
  77. data/lib/{csv_decision → csv_decision2}/scan_row.rb +2 -2
  78. data/lib/{csv_decision → csv_decision2}/table.rb +8 -8
  79. data/lib/{csv_decision → csv_decision2}/validate.rb +2 -2
  80. data/lib/csv_decision2.rb +45 -0
  81. data/spec/{csv_decision → csv_decision2}/columns_spec.rb +44 -44
  82. data/spec/{csv_decision → csv_decision2}/constant_spec.rb +4 -4
  83. data/spec/{csv_decision → csv_decision2}/data_spec.rb +11 -11
  84. data/spec/{csv_decision → csv_decision2}/decision_spec.rb +6 -6
  85. data/spec/{csv_decision → csv_decision2}/examples_spec.rb +14 -14
  86. data/spec/{csv_decision → csv_decision2}/index_spec.rb +8 -8
  87. data/spec/{csv_decision → csv_decision2}/input_spec.rb +9 -9
  88. data/spec/{csv_decision → csv_decision2}/load_spec.rb +8 -8
  89. data/spec/{csv_decision → csv_decision2}/matchers/function_spec.rb +7 -7
  90. data/spec/{csv_decision → csv_decision2}/matchers/guard_spec.rb +14 -14
  91. data/spec/{csv_decision → csv_decision2}/matchers/numeric_spec.rb +5 -5
  92. data/spec/{csv_decision → csv_decision2}/matchers/pattern_spec.rb +6 -6
  93. data/spec/{csv_decision → csv_decision2}/matchers/range_spec.rb +5 -5
  94. data/spec/{csv_decision → csv_decision2}/matchers/symbol_spec.rb +6 -6
  95. data/spec/{csv_decision → csv_decision2}/options_spec.rb +18 -18
  96. data/spec/csv_decision2/parse_spec.rb +44 -0
  97. data/spec/{csv_decision → csv_decision2}/table_spec.rb +17 -17
  98. data/spec/csv_decision2_spec.rb +7 -0
  99. metadata +64 -64
  100. data/lib/csv_decision.rb +0 -45
  101. data/spec/csv_decision/parse_spec.rb +0 -44
  102. data/spec/csv_decision_spec.rb +0 -7
@@ -1,1433 +1,1518 @@
1
1
  <!DOCTYPE html>
2
2
  <html>
3
- <head>
4
- <meta charset="utf-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>
7
- Class: CSVDecision::Table
8
-
3
+
4
+ <head>
5
+ <meta charset="utf-8">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <title>
8
+ Class: CSVDecision2::Table
9
+
9
10
  &mdash; Documentation by YARD 0.9.12
10
-
11
- </title>
12
11
 
13
- <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
12
+ </title>
13
+
14
+ <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
15
+
16
+ <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
17
+
18
+ <script type="text/javascript" charset="utf-8">
19
+ pathId = "CSVDecision2::Table";
20
+ relpath = '../';
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
27
+
28
+
29
+ </head>
30
+
31
+ <body>
32
+ <div class="nav_wrap">
33
+ <iframe id="nav" src="../class_list.html?1"></iframe>
34
+ <div id="resizer"></div>
35
+ </div>
36
+
37
+ <div id="main" tabindex="-1">
38
+ <div id="header">
39
+ <div id="menu">
40
+
41
+ <a href="../_index.html">Index (T)</a> &raquo;
42
+ <span class='title'><span class='object_link'><a href="../CSVDecision2.html"
43
+ title="CSVDecision (module)">CSVDecision</a></span></span>
44
+ &raquo;
45
+ <span class="title">Table</span>
46
+
47
+ </div>
48
+
49
+ <div id="search">
50
+
51
+ <a class="full_list_link" id="class_list_link" href="../class_list.html">
52
+
53
+ <svg width="24" height="24">
54
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
55
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
56
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
57
+ </svg>
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <div id="content">
65
+ <h1>Class: CSVDecision2::Table
66
+
67
+
68
+
69
+ </h1>
70
+ <div class="box_info">
71
+
72
+ <dl>
73
+ <dt>Inherits:</dt>
74
+ <dd>
75
+ <span class="inheritName">Object</span>
76
+
77
+ <ul class="fullTree">
78
+ <li>Object</li>
79
+
80
+ <li class="next">CSVDecision2::Table</li>
81
+
82
+ </ul>
83
+ <a href="#" class="inheritanceTree">show all</a>
84
+
85
+ </dd>
86
+ </dl>
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+ <dl>
99
+ <dt>Defined in:</dt>
100
+ <dd>lib/csv_decision2/table.rb</dd>
101
+ </dl>
102
+
103
+ </div>
104
+
105
+ <h2>Overview</h2>
106
+ <div class="docstring">
107
+ <div class="discussion">
108
+
109
+ <p>Decision table that accepts an input hash and outputs a decision (hash).</p>
110
+
111
+
112
+ </div>
113
+ </div>
114
+ <div class="tags">
115
+
116
+
117
+ </div>
118
+
119
+
120
+
121
+ <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
122
+ <ul class="summary">
123
+
124
+ <li class="public ">
125
+ <span class="summary_signature">
126
+
127
+ <a href="#columns-instance_method" title="#columns (instance method)">#<strong>columns</strong> &#x21d2;
128
+ CSVDecision2::Columns </a>
129
+
130
+
131
+
132
+ </span>
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+ <span class="summary_desc">
146
+ <div class='inline'>
147
+ <p>Dictionary of all input and output columns.</p>
148
+ </div>
149
+ </span>
150
+
151
+ </li>
152
+
153
+
154
+ <li class="public ">
155
+ <span class="summary_signature">
156
+
157
+ <a href="#file-instance_method" title="#file (instance method)">#<strong>file</strong> &#x21d2; File, ...
158
+ </a>
159
+
160
+
161
+
162
+ </span>
163
+
164
+
165
+
166
+
167
+
168
+
169
+
170
+
171
+
172
+
173
+
174
+
175
+ <span class="summary_desc">
176
+ <div class='inline'>
177
+ <p>CSV file.</p>
178
+ </div>
179
+ </span>
180
+
181
+ </li>
182
+
183
+
184
+ <li class="public ">
185
+ <span class="summary_signature">
186
+
187
+ <a href="#if_rows-instance_method" title="#if_rows (instance method)">#<strong>if_rows</strong> &#x21d2;
188
+ Array&lt;CSVDecision2::ScanRow&gt; </a>
189
+
190
+
191
+
192
+ </span>
193
+
194
+
195
+
196
+
197
+
198
+
199
+
200
+
201
+
202
+ <span class="private note title">private</span>
203
+
204
+
205
+ <span class="summary_desc">
206
+ <div class='inline'>
207
+ <p>Used to implement filtering of final results.</p>
208
+ </div>
209
+ </span>
210
+
211
+ </li>
212
+
213
+
214
+ <li class="public ">
215
+ <span class="summary_signature">
216
+
217
+ <a href="#index-instance_method" title="#index (instance method)">#<strong>index</strong> &#x21d2;
218
+ CSVDecision2::Index </a>
219
+
220
+
221
+
222
+ </span>
223
+
224
+
225
+
226
+
227
+
228
+
229
+
230
+
231
+
232
+
233
+
234
+
235
+ <span class="summary_desc">
236
+ <div class='inline'>
237
+ <p>The index built on one or more input columns.</p>
238
+ </div>
239
+ </span>
240
+
241
+ </li>
242
+
243
+
244
+ <li class="public ">
245
+ <span class="summary_signature">
246
+
247
+ <a href="#options-instance_method" title="#options (instance method)">#<strong>options</strong> &#x21d2;
248
+ Hash </a>
249
+
250
+
251
+
252
+ </span>
253
+
254
+
255
+
256
+
257
+
258
+
259
+
260
+
261
+
262
+
263
+
264
+
265
+ <span class="summary_desc">
266
+ <div class='inline'>
267
+ <p>All options, explicitly set or defaulted, used to parse the table.</p>
268
+ </div>
269
+ </span>
270
+
271
+ </li>
272
+
273
+
274
+ <li class="public ">
275
+ <span class="summary_signature">
276
+
277
+ <a href="#outs_functions-instance_method"
278
+ title="#outs_functions (instance method)">#<strong>outs_functions</strong> &#x21d2; Object </a>
279
+
280
+
281
+
282
+ </span>
283
+
284
+
285
+
286
+
287
+
288
+
289
+
290
+
291
+
292
+ <span class="private note title">private</span>
293
+
294
+
295
+ <span class="summary_desc">
296
+ <div class='inline'>
297
+ <p>Set if the table row has any output functions (planned feature).</p>
298
+ </div>
299
+ </span>
300
+
301
+ </li>
302
+
303
+
304
+ <li class="public ">
305
+ <span class="summary_signature">
306
+
307
+ <a href="#outs_rows-instance_method" title="#outs_rows (instance method)">#<strong>outs_rows</strong>
308
+ &#x21d2; Array&lt;CSVDecision2::ScanRow&gt; </a>
309
+
310
+
311
+
312
+ </span>
313
+
314
+
315
+
316
+
317
+
318
+
319
+
320
+
321
+
322
+ <span class="private note title">private</span>
323
+
324
+
325
+ <span class="summary_desc">
326
+ <div class='inline'>
327
+ <p>Used to implement outputting of final results.</p>
328
+ </div>
329
+ </span>
330
+
331
+ </li>
332
+
333
+
334
+ <li class="public ">
335
+ <span class="summary_signature">
336
+
337
+ <a href="#paths-instance_method" title="#paths (instance method)">#<strong>paths</strong> &#x21d2;
338
+ CSVDecision2::Path </a>
339
+
340
+
341
+
342
+ </span>
343
+
344
+
345
+
346
+
347
+
348
+
349
+
350
+
351
+
352
+
353
+
354
+
355
+ <span class="summary_desc">
356
+ <div class='inline'>
357
+ <p>The array of paths built on one or more input columns.</p>
358
+ </div>
359
+ </span>
360
+
361
+ </li>
362
+
363
+
364
+ <li class="public ">
365
+ <span class="summary_signature">
366
+
367
+ <a href="#rows-instance_method" title="#rows (instance method)">#<strong>rows</strong> &#x21d2;
368
+ Array&lt;Array&gt; </a>
369
+
370
+
371
+
372
+ </span>
373
+
374
+
375
+
376
+
377
+
378
+
379
+
380
+
381
+
382
+ <span class="private note title">private</span>
383
+
384
+
385
+ <span class="summary_desc">
386
+ <div class='inline'>
387
+ <p>Data rows after parsing.</p>
388
+ </div>
389
+ </span>
390
+
391
+ </li>
392
+
393
+
394
+ <li class="public ">
395
+ <span class="summary_signature">
396
+
397
+ <a href="#scan_rows-instance_method" title="#scan_rows (instance method)">#<strong>scan_rows</strong>
398
+ &#x21d2; Array&lt;CSVDecision2::ScanRow&gt; </a>
399
+
400
+
401
+
402
+ </span>
403
+
404
+
405
+
406
+
407
+
408
+
409
+
410
+
411
+
412
+ <span class="private note title">private</span>
413
+
414
+
415
+ <span class="summary_desc">
416
+ <div class='inline'>
417
+ <p>Scanning objects used to implement input matching logic.</p>
418
+ </div>
419
+ </span>
420
+
421
+ </li>
422
+
423
+
424
+ </ul>
425
+
426
+
427
+
428
+
429
+
430
+ <h2>
431
+ Instance Method Summary
432
+ <small><a href="#" class="summary_toggle">collapse</a></small>
433
+ </h2>
434
+
435
+ <ul class="summary">
436
+
437
+ <li class="public ">
438
+ <span class="summary_signature">
439
+
440
+ <a href="#decide-instance_method" title="#decide (instance method)">#<strong>decide</strong>(input) &#x21d2;
441
+ {Symbol =&gt; Object, Array&lt;Object&gt;} </a>
442
+
443
+
444
+
445
+ </span>
446
+
447
+
448
+
449
+
450
+
451
+
452
+
453
+
454
+
455
+ <span class="summary_desc">
456
+ <div class='inline'>
457
+ <p>Make a decision based off an input hash.</p>
458
+ </div>
459
+ </span>
460
+
461
+ </li>
462
+
463
+
464
+ <li class="public ">
465
+ <span class="summary_signature">
466
+
467
+ <a href="#decide!-instance_method" title="#decide! (instance method)">#<strong>decide!</strong>(input)
468
+ &#x21d2; {Symbol =&gt; Object, Array&lt;Object&gt;} </a>
469
+
470
+
471
+
472
+ </span>
473
+
474
+
475
+
476
+
477
+
478
+
479
+
480
+
481
+
482
+ <span class="summary_desc">
483
+ <div class='inline'>
484
+ <p>Unsafe version of decide - may mutate the input hash and assumes the input
485
+ hash is symbolized.</p>
486
+ </div>
487
+ </span>
488
+
489
+ </li>
490
+
491
+
492
+ <li class="public ">
493
+ <span class="summary_signature">
494
+
495
+ <a href="#each-instance_method" title="#each (instance method)">#<strong>each</strong>(first = 0, last =
496
+ @rows.count - 1) &#x21d2; Object </a>
497
+
498
+
499
+
500
+ </span>
501
+
502
+
503
+
504
+
505
+
506
+
507
+ <span class="private note title">private</span>
508
+
509
+
510
+ <span class="summary_desc">
511
+ <div class='inline'>
512
+ <p>Iterate through all data rows of the decision table, with an optional first
513
+ and last row index given.</p>
514
+ </div>
515
+ </span>
516
+
517
+ </li>
518
+
519
+
520
+ <li class="public ">
521
+ <span class="summary_signature">
522
+
523
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>
524
+ &#x21d2; Table </a>
525
+
526
+
527
+
528
+ </span>
529
+
530
+
531
+ <span class="note title constructor">constructor</span>
532
+
533
+
534
+
535
+
536
+
537
+ <span class="private note title">private</span>
538
+
539
+
540
+ <span class="summary_desc">
541
+ <div class='inline'>
542
+ <p>A new instance of Table.</p>
543
+ </div>
544
+ </span>
545
+
546
+ </li>
547
+
548
+
549
+ </ul>
550
+
551
+
552
+ <div id="constructor_details" class="method_details_list">
553
+ <h2>Constructor Details</h2>
554
+
555
+ <div class="method_details first">
556
+ <h3 class="signature first" id="initialize-instance_method">
557
+
558
+ #<strong>initialize</strong> &#x21d2; <tt><span class='object_link'><a href=""
559
+ title="CSVDecision2::Table (class)">Table</a></span></tt>
560
+
561
+
562
+
563
+
564
+
565
+ </h3>
566
+ <div class="docstring">
567
+ <div class="discussion">
568
+ <p class="note private">
569
+ <strong>This method is part of a private API.</strong>
570
+ You should avoid using this method if possible, as it may be removed or be changed in the future.
571
+ </p>
572
+
573
+ <p>Returns a new instance of Table</p>
574
+
575
+
576
+ </div>
577
+ </div>
578
+ <div class="tags">
579
+
580
+
581
+ </div>
582
+ <table class="source_code">
583
+ <tr>
584
+ <td>
585
+ <pre class="lines">
586
+
587
+
588
+ 83
589
+ 84
590
+ 85
591
+ 86
592
+ 87
593
+ 88
594
+ 89</pre>
595
+ </td>
596
+ <td>
597
+ <pre class="code"><span class="info file"># File 'lib/csv_decision2/table.rb', line 83</span>
598
+
599
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
600
+ <span class='ivar'>@paths</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
601
+ <span class='ivar'>@outs_rows</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
602
+ <span class='ivar'>@if_rows</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
603
+ <span class='ivar'>@rows</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
604
+ <span class='ivar'>@scan_rows</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
605
+ <span class='kw'>end</span></pre>
606
+ </td>
607
+ </tr>
608
+ </table>
609
+ </div>
610
+
611
+ </div>
612
+
613
+ <div id="instance_attr_details" class="attr_details">
614
+ <h2>Instance Attribute Details</h2>
615
+
616
+
617
+ <span id="columns=-instance_method"></span>
618
+ <div class="method_details first">
619
+ <h3 class="signature first" id="columns-instance_method">
620
+
621
+ #<strong>columns</strong> &#x21d2; <tt><span class='object_link'><a href="Columns.html"
622
+ title="CSVDecision2::Columns (class)">CSVDecision2::Columns</a></span></tt>
623
+
624
+
625
+
626
+
627
+
628
+ </h3>
629
+ <div class="docstring">
630
+ <div class="discussion">
631
+
632
+ <p>Returns Dictionary of all input and output columns.</p>
633
+
634
+
635
+ </div>
636
+ </div>
637
+ <div class="tags">
638
+
639
+ <p class="tag_title">Returns:</p>
640
+ <ul class="return">
641
+
642
+ <li>
643
+
644
+
645
+ <span class='type'>(<tt><span class='object_link'><a href="Columns.html"
646
+ title="CSVDecision2::Columns (class)">CSVDecision2::Columns</a></span></tt>)</span>
647
+
648
+
649
+
650
+ &mdash;
651
+ <div class='inline'>
652
+ <p>Dictionary of all input and output columns.</p>
653
+ </div>
654
+
655
+ </li>
656
+
657
+ </ul>
658
+
659
+ </div>
660
+ <table class="source_code">
661
+ <tr>
662
+ <td>
663
+ <pre class="lines">
664
+
665
+
666
+ 31
667
+ 32
668
+ 33</pre>
669
+ </td>
670
+ <td>
671
+ <pre class="code"><span class="info file"># File 'lib/csv_decision2/table.rb', line 31</span>
672
+
673
+ <span class='kw'>def</span> <span class='id identifier rubyid_columns'>columns</span>
674
+ <span class='ivar'>@columns</span>
675
+ <span class='kw'>end</span></pre>
676
+ </td>
677
+ </tr>
678
+ </table>
679
+ </div>
680
+
681
+
682
+ <span id="file=-instance_method"></span>
683
+ <div class="method_details ">
684
+ <h3 class="signature " id="file-instance_method">
685
+
686
+ #<strong>file</strong> &#x21d2; <tt>File</tt>, ...
687
+
688
+
689
+
690
+
691
+
692
+ </h3>
693
+ <div class="docstring">
694
+ <div class="discussion">
695
+
696
+ <p>CSV file.</p>
697
+
698
+
699
+ </div>
700
+ </div>
701
+ <div class="tags">
702
+
703
+ <p class="tag_title">Returns:</p>
704
+ <ul class="return">
705
+
706
+ <li>
707
+
708
+
709
+ <span class='type'>(<tt>File</tt>, <tt>Pathname</tt>, <tt>nil</tt>)</span>
710
+
711
+
712
+
713
+ &mdash;
714
+ <div class='inline'>
715
+ <p>File path name if decision table was loaded from a</p>
716
+ </div>
717
+
718
+ </li>
719
+
720
+ </ul>
721
+
722
+ </div>
723
+ <table class="source_code">
724
+ <tr>
725
+ <td>
726
+ <pre class="lines">
727
+
728
+
729
+ 35
730
+ 36
731
+ 37</pre>
732
+ </td>
733
+ <td>
734
+ <pre class="code"><span class="info file"># File 'lib/csv_decision2/table.rb', line 35</span>
735
+
736
+ <span class='kw'>def</span> <span class='id identifier rubyid_file'>file</span>
737
+ <span class='ivar'>@file</span>
738
+ <span class='kw'>end</span></pre>
739
+ </td>
740
+ </tr>
741
+ </table>
742
+ </div>
743
+
744
+
745
+ <span id="if_rows=-instance_method"></span>
746
+ <div class="method_details ">
747
+ <h3 class="signature " id="if_rows-instance_method">
748
+
749
+ #<strong>if_rows</strong> &#x21d2; <tt>Array&lt;<span class='object_link'><a href="ScanRow.html"
750
+ title="CSVDecision2::ScanRow (class)">CSVDecision2::ScanRow</a></span>&gt;</tt>
751
+
752
+
753
+
754
+
755
+
756
+ </h3>
757
+ <div class="docstring">
758
+ <div class="discussion">
759
+ <p class="note private">
760
+ <strong>This method is part of a private API.</strong>
761
+ You should avoid using this method if possible, as it may be removed or be changed in the future.
762
+ </p>
763
+
764
+ <p>Returns Used to implement filtering of final results.</p>
765
+
766
+
767
+ </div>
768
+ </div>
769
+ <div class="tags">
770
+
771
+ <p class="tag_title">Returns:</p>
772
+ <ul class="return">
773
+
774
+ <li>
775
+
776
+
777
+ <span class='type'>(<tt>Array&lt;<span class='object_link'><a href="ScanRow.html"
778
+ title="CSVDecision2::ScanRow (class)">CSVDecision2::ScanRow</a></span>&gt;</tt>)</span>
779
+
780
+
781
+
782
+ &mdash;
783
+ <div class='inline'>
784
+ <p>Used to implement filtering of final results.</p>
785
+ </div>
786
+
787
+ </li>
788
+
789
+ </ul>
790
+
791
+ </div>
792
+ <table class="source_code">
793
+ <tr>
794
+ <td>
795
+ <pre class="lines">
796
+
797
+
798
+ 65
799
+ 66
800
+ 67</pre>
801
+ </td>
802
+ <td>
803
+ <pre class="code"><span class="info file"># File 'lib/csv_decision2/table.rb', line 65</span>
804
+
805
+ <span class='kw'>def</span> <span class='id identifier rubyid_if_rows'>if_rows</span>
806
+ <span class='ivar'>@if_rows</span>
807
+ <span class='kw'>end</span></pre>
808
+ </td>
809
+ </tr>
810
+ </table>
811
+ </div>
14
812
 
15
- <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
16
813
 
17
- <script type="text/javascript" charset="utf-8">
18
- pathId = "CSVDecision::Table";
19
- relpath = '../';
20
- </script>
814
+ <span id="index=-instance_method"></span>
815
+ <div class="method_details ">
816
+ <h3 class="signature " id="index-instance_method">
21
817
 
818
+ #<strong>index</strong> &#x21d2; <tt><span class='object_link'><a href="Index.html"
819
+ title="CSVDecision2::Index (class)">CSVDecision2::Index</a></span></tt>
22
820
 
23
- <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
24
821
 
25
- <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
26
822
 
27
823
 
28
- </head>
29
- <body>
30
- <div class="nav_wrap">
31
- <iframe id="nav" src="../class_list.html?1"></iframe>
32
- <div id="resizer"></div>
33
- </div>
34
824
 
35
- <div id="main" tabindex="-1">
36
- <div id="header">
37
- <div id="menu">
38
-
39
- <a href="../_index.html">Index (T)</a> &raquo;
40
- <span class='title'><span class='object_link'><a href="../CSVDecision.html" title="CSVDecision (module)">CSVDecision</a></span></span>
41
- &raquo;
42
- <span class="title">Table</span>
43
-
44
- </div>
45
-
46
- <div id="search">
47
-
48
- <a class="full_list_link" id="class_list_link"
49
- href="../class_list.html">
50
-
51
- <svg width="24" height="24">
52
- <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
- <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
- <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
- </svg>
56
- </a>
57
-
58
- </div>
59
- <div class="clear"></div>
60
- </div>
825
+ </h3>
826
+ <div class="docstring">
827
+ <div class="discussion">
61
828
 
62
- <div id="content"><h1>Class: CSVDecision::Table
63
-
64
-
65
-
66
- </h1>
67
- <div class="box_info">
68
-
69
- <dl>
70
- <dt>Inherits:</dt>
71
- <dd>
72
- <span class="inheritName">Object</span>
73
-
74
- <ul class="fullTree">
75
- <li>Object</li>
76
-
77
- <li class="next">CSVDecision::Table</li>
78
-
79
- </ul>
80
- <a href="#" class="inheritanceTree">show all</a>
81
-
82
- </dd>
83
- </dl>
84
-
85
-
86
-
87
-
88
-
89
-
90
-
91
-
92
-
93
-
94
-
95
- <dl>
96
- <dt>Defined in:</dt>
97
- <dd>lib/csv_decision/table.rb</dd>
98
- </dl>
99
-
100
- </div>
101
-
102
- <h2>Overview</h2><div class="docstring">
103
- <div class="discussion">
104
-
105
- <p>Decision table that accepts an input hash and outputs a decision (hash).</p>
829
+ <p>Returns The index built on one or more input columns.</p>
106
830
 
107
831
 
108
- </div>
109
- </div>
110
- <div class="tags">
111
-
112
-
113
- </div>
114
-
115
-
116
-
117
- <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
118
- <ul class="summary">
119
-
120
- <li class="public ">
121
- <span class="summary_signature">
122
-
123
- <a href="#columns-instance_method" title="#columns (instance method)">#<strong>columns</strong> &#x21d2; CSVDecision::Columns </a>
124
-
125
-
126
-
127
- </span>
128
-
129
-
130
-
131
-
132
-
133
-
134
-
135
-
136
-
137
-
138
-
139
-
140
- <span class="summary_desc"><div class='inline'>
141
- <p>Dictionary of all input and output columns.</p>
142
- </div></span>
143
-
144
- </li>
145
-
146
-
147
- <li class="public ">
148
- <span class="summary_signature">
149
-
150
- <a href="#file-instance_method" title="#file (instance method)">#<strong>file</strong> &#x21d2; File, ... </a>
151
-
152
-
153
-
154
- </span>
155
-
156
-
157
-
158
-
159
-
160
-
161
-
162
-
163
-
164
-
165
-
166
-
167
- <span class="summary_desc"><div class='inline'>
168
- <p>CSV file.</p>
169
- </div></span>
170
-
171
- </li>
172
-
173
-
174
- <li class="public ">
175
- <span class="summary_signature">
176
-
177
- <a href="#if_rows-instance_method" title="#if_rows (instance method)">#<strong>if_rows</strong> &#x21d2; Array&lt;CSVDecision::ScanRow&gt; </a>
178
-
179
-
180
-
181
- </span>
182
-
183
-
184
-
185
-
186
-
187
-
188
-
189
-
190
-
191
- <span class="private note title">private</span>
192
-
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="#index-instance_method" title="#index (instance method)">#<strong>index</strong> &#x21d2; 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
-
225
- </li>
226
-
227
-
228
- <li class="public ">
229
- <span class="summary_signature">
230
-
231
- <a href="#options-instance_method" title="#options (instance method)">#<strong>options</strong> &#x21d2; Hash </a>
232
-
233
-
234
-
235
- </span>
236
-
237
-
238
-
239
-
240
-
241
-
242
-
243
-
244
-
245
-
246
-
247
-
248
- <span class="summary_desc"><div class='inline'>
249
- <p>All options, explicitly set or defaulted, used to parse the table.</p>
250
- </div></span>
251
-
252
- </li>
253
-
254
-
255
- <li class="public ">
256
- <span class="summary_signature">
257
-
258
- <a href="#outs_functions-instance_method" title="#outs_functions (instance method)">#<strong>outs_functions</strong> &#x21d2; Object </a>
259
-
260
-
261
-
262
- </span>
263
-
264
-
265
-
266
-
267
-
268
-
269
-
270
-
271
-
272
- <span class="private note title">private</span>
273
-
274
-
275
- <span class="summary_desc"><div class='inline'>
276
- <p>Set if the table row has any output functions (planned feature).</p>
277
- </div></span>
278
-
279
- </li>
280
-
281
-
282
- <li class="public ">
283
- <span class="summary_signature">
284
-
285
- <a href="#outs_rows-instance_method" title="#outs_rows (instance method)">#<strong>outs_rows</strong> &#x21d2; Array&lt;CSVDecision::ScanRow&gt; </a>
286
-
287
-
288
-
289
- </span>
290
-
291
-
292
-
293
-
294
-
295
-
296
-
297
-
298
-
299
- <span class="private note title">private</span>
300
-
301
-
302
- <span class="summary_desc"><div class='inline'>
303
- <p>Used to implement outputting of final results.</p>
304
- </div></span>
305
-
306
- </li>
307
-
308
-
309
- <li class="public ">
310
- <span class="summary_signature">
311
-
312
- <a href="#paths-instance_method" title="#paths (instance method)">#<strong>paths</strong> &#x21d2; CSVDecision::Path </a>
313
-
314
-
315
-
316
- </span>
317
-
318
-
319
-
320
-
321
-
322
-
323
-
324
-
325
-
326
-
327
-
328
-
329
- <span class="summary_desc"><div class='inline'>
330
- <p>The array of paths built on one or more input columns.</p>
331
- </div></span>
332
-
333
- </li>
334
-
335
-
336
- <li class="public ">
337
- <span class="summary_signature">
338
-
339
- <a href="#rows-instance_method" title="#rows (instance method)">#<strong>rows</strong> &#x21d2; Array&lt;Array&gt; </a>
340
-
341
-
342
-
343
- </span>
344
-
345
-
346
-
347
-
348
-
349
-
350
-
351
-
352
-
353
- <span class="private note title">private</span>
354
-
355
-
356
- <span class="summary_desc"><div class='inline'>
357
- <p>Data rows after parsing.</p>
358
- </div></span>
359
-
360
- </li>
361
-
362
-
363
- <li class="public ">
364
- <span class="summary_signature">
365
-
366
- <a href="#scan_rows-instance_method" title="#scan_rows (instance method)">#<strong>scan_rows</strong> &#x21d2; Array&lt;CSVDecision::ScanRow&gt; </a>
367
-
368
-
369
-
370
- </span>
371
-
372
-
373
-
374
-
375
-
376
-
377
-
378
-
379
-
380
- <span class="private note title">private</span>
381
-
382
-
383
- <span class="summary_desc"><div class='inline'>
384
- <p>Scanning objects used to implement input matching logic.</p>
385
- </div></span>
386
-
387
- </li>
388
-
389
-
390
- </ul>
391
-
392
-
393
-
394
-
395
-
396
- <h2>
397
- Instance Method Summary
398
- <small><a href="#" class="summary_toggle">collapse</a></small>
399
- </h2>
400
-
401
- <ul class="summary">
402
-
403
- <li class="public ">
404
- <span class="summary_signature">
405
-
406
- <a href="#decide-instance_method" title="#decide (instance method)">#<strong>decide</strong>(input) &#x21d2; {Symbol =&gt; Object, Array&lt;Object&gt;} </a>
407
-
408
-
409
-
410
- </span>
411
-
412
-
413
-
414
-
415
-
416
-
417
-
418
-
419
-
420
- <span class="summary_desc"><div class='inline'>
421
- <p>Make a decision based off an input hash.</p>
422
- </div></span>
423
-
424
- </li>
425
-
426
-
427
- <li class="public ">
428
- <span class="summary_signature">
429
-
430
- <a href="#decide!-instance_method" title="#decide! (instance method)">#<strong>decide!</strong>(input) &#x21d2; {Symbol =&gt; Object, Array&lt;Object&gt;} </a>
431
-
432
-
433
-
434
- </span>
435
-
436
-
437
-
438
-
439
-
440
-
441
-
442
-
443
-
444
- <span class="summary_desc"><div class='inline'>
445
- <p>Unsafe version of decide - may mutate the input hash and assumes the input
446
- hash is symbolized.</p>
447
- </div></span>
448
-
449
- </li>
450
-
451
-
452
- <li class="public ">
453
- <span class="summary_signature">
454
-
455
- <a href="#each-instance_method" title="#each (instance method)">#<strong>each</strong>(first = 0, last = @rows.count - 1) &#x21d2; Object </a>
456
-
457
-
458
-
459
- </span>
460
-
461
-
462
-
463
-
464
-
465
-
466
- <span class="private note title">private</span>
467
-
468
-
469
- <span class="summary_desc"><div class='inline'>
470
- <p>Iterate through all data rows of the decision table, with an optional first
471
- and last row index given.</p>
472
- </div></span>
473
-
474
- </li>
475
-
476
-
477
- <li class="public ">
478
- <span class="summary_signature">
479
-
480
- <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong> &#x21d2; Table </a>
481
-
482
-
483
-
484
- </span>
485
-
486
-
487
- <span class="note title constructor">constructor</span>
488
-
489
-
490
-
491
-
492
-
493
- <span class="private note title">private</span>
494
-
495
-
496
- <span class="summary_desc"><div class='inline'>
497
- <p>A new instance of Table.</p>
498
- </div></span>
499
-
500
- </li>
501
-
502
-
503
- </ul>
504
-
505
-
506
- <div id="constructor_details" class="method_details_list">
507
- <h2>Constructor Details</h2>
508
-
509
- <div class="method_details first">
510
- <h3 class="signature first" id="initialize-instance_method">
511
-
512
- #<strong>initialize</strong> &#x21d2; <tt><span class='object_link'><a href="" title="CSVDecision::Table (class)">Table</a></span></tt>
513
-
514
-
515
-
516
-
517
-
518
- </h3><div class="docstring">
519
- <div class="discussion">
520
- <p class="note private">
521
- <strong>This method is part of a private API.</strong>
522
- You should avoid using this method if possible, as it may be removed or be changed in the future.
523
- </p>
524
-
525
- <p>Returns a new instance of Table</p>
832
+ </div>
833
+ </div>
834
+ <div class="tags">
526
835
 
836
+ <p class="tag_title">Returns:</p>
837
+ <ul class="return">
527
838
 
528
- </div>
529
- </div>
530
- <div class="tags">
531
-
839
+ <li>
532
840
 
533
- </div><table class="source_code">
534
- <tr>
535
- <td>
536
- <pre class="lines">
537
841
 
842
+ <span class='type'>(<tt><span class='object_link'><a href="Index.html"
843
+ title="CSVDecision2::Index (class)">CSVDecision2::Index</a></span></tt>)</span>
538
844
 
539
- 83
540
- 84
541
- 85
542
- 86
543
- 87
544
- 88
545
- 89</pre>
546
- </td>
547
- <td>
548
- <pre class="code"><span class="info file"># File 'lib/csv_decision/table.rb', line 83</span>
549
845
 
550
- <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
551
- <span class='ivar'>@paths</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
552
- <span class='ivar'>@outs_rows</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
553
- <span class='ivar'>@if_rows</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
554
- <span class='ivar'>@rows</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
555
- <span class='ivar'>@scan_rows</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
556
- <span class='kw'>end</span></pre>
557
- </td>
558
- </tr>
559
- </table>
560
- </div>
561
-
562
- </div>
563
-
564
- <div id="instance_attr_details" class="attr_details">
565
- <h2>Instance Attribute Details</h2>
566
-
567
-
568
- <span id="columns=-instance_method"></span>
569
- <div class="method_details first">
570
- <h3 class="signature first" id="columns-instance_method">
571
-
572
- #<strong>columns</strong> &#x21d2; <tt><span class='object_link'><a href="Columns.html" title="CSVDecision::Columns (class)">CSVDecision::Columns</a></span></tt>
573
-
574
-
575
-
576
-
577
-
578
- </h3><div class="docstring">
579
- <div class="discussion">
580
-
581
- <p>Returns Dictionary of all input and output columns.</p>
582
846
 
847
+ &mdash;
848
+ <div class='inline'>
849
+ <p>The index built on one or more input columns.</p>
850
+ </div>
583
851
 
584
- </div>
585
- </div>
586
- <div class="tags">
587
-
588
- <p class="tag_title">Returns:</p>
589
- <ul class="return">
590
-
591
- <li>
592
-
593
-
594
- <span class='type'>(<tt><span class='object_link'><a href="Columns.html" title="CSVDecision::Columns (class)">CSVDecision::Columns</a></span></tt>)</span>
595
-
596
-
597
-
598
- &mdash;
599
- <div class='inline'>
600
- <p>Dictionary of all input and output columns.</p>
601
- </div>
602
-
603
- </li>
604
-
605
- </ul>
606
-
607
- </div><table class="source_code">
608
- <tr>
609
- <td>
610
- <pre class="lines">
852
+ </li>
611
853
 
854
+ </ul>
612
855
 
613
- 31
614
- 32
615
- 33</pre>
616
- </td>
617
- <td>
618
- <pre class="code"><span class="info file"># File 'lib/csv_decision/table.rb', line 31</span>
856
+ </div>
857
+ <table class="source_code">
858
+ <tr>
859
+ <td>
860
+ <pre class="lines">
619
861
 
620
- <span class='kw'>def</span> <span class='id identifier rubyid_columns'>columns</span>
621
- <span class='ivar'>@columns</span>
862
+
863
+ 38
864
+ 39
865
+ 40</pre>
866
+ </td>
867
+ <td>
868
+ <pre class="code"><span class="info file"># File 'lib/csv_decision2/table.rb', line 38</span>
869
+
870
+ <span class='kw'>def</span> <span class='id identifier rubyid_index'>index</span>
871
+ <span class='ivar'>@index</span>
622
872
  <span class='kw'>end</span></pre>
623
- </td>
624
- </tr>
625
- </table>
626
- </div>
627
-
628
-
629
- <span id="file=-instance_method"></span>
630
- <div class="method_details ">
631
- <h3 class="signature " id="file-instance_method">
632
-
633
- #<strong>file</strong> &#x21d2; <tt>File</tt>, ...
634
-
635
-
636
-
637
-
638
-
639
- </h3><div class="docstring">
640
- <div class="discussion">
641
-
642
- <p>CSV file.</p>
873
+ </td>
874
+ </tr>
875
+ </table>
876
+ </div>
643
877
 
644
878
 
645
- </div>
646
- </div>
647
- <div class="tags">
648
-
649
- <p class="tag_title">Returns:</p>
650
- <ul class="return">
651
-
652
- <li>
653
-
654
-
655
- <span class='type'>(<tt>File</tt>, <tt>Pathname</tt>, <tt>nil</tt>)</span>
656
-
657
-
658
-
659
- &mdash;
660
- <div class='inline'>
661
- <p>File path name if decision table was loaded from a</p>
662
- </div>
663
-
664
- </li>
665
-
666
- </ul>
667
-
668
- </div><table class="source_code">
669
- <tr>
670
- <td>
671
- <pre class="lines">
879
+ <span id="options=-instance_method"></span>
880
+ <div class="method_details ">
881
+ <h3 class="signature " id="options-instance_method">
672
882
 
883
+ #<strong>options</strong> &#x21d2; <tt>Hash</tt>
673
884
 
674
- 35
675
- 36
676
- 37</pre>
677
- </td>
678
- <td>
679
- <pre class="code"><span class="info file"># File 'lib/csv_decision/table.rb', line 35</span>
680
885
 
681
- <span class='kw'>def</span> <span class='id identifier rubyid_file'>file</span>
682
- <span class='ivar'>@file</span>
683
- <span class='kw'>end</span></pre>
684
- </td>
685
- </tr>
686
- </table>
687
- </div>
688
-
689
-
690
- <span id="if_rows=-instance_method"></span>
691
- <div class="method_details ">
692
- <h3 class="signature " id="if_rows-instance_method">
693
-
694
- #<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>
695
-
696
-
697
-
698
-
699
-
700
- </h3><div class="docstring">
701
- <div class="discussion">
702
- <p class="note private">
703
- <strong>This method is part of a private API.</strong>
704
- You should avoid using this method if possible, as it may be removed or be changed in the future.
705
- </p>
706
-
707
- <p>Returns Used to implement filtering of final results.</p>
708
886
 
709
887
 
710
- </div>
711
- </div>
712
- <div class="tags">
713
-
714
- <p class="tag_title">Returns:</p>
715
- <ul class="return">
716
-
717
- <li>
718
-
719
-
720
- <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>
721
-
722
-
723
-
724
- &mdash;
725
- <div class='inline'>
726
- <p>Used to implement filtering of final results.</p>
727
- </div>
728
-
729
- </li>
730
-
731
- </ul>
732
-
733
- </div><table class="source_code">
734
- <tr>
735
- <td>
736
- <pre class="lines">
737
888
 
889
+ </h3>
890
+ <div class="docstring">
891
+ <div class="discussion">
738
892
 
739
- 65
740
- 66
741
- 67</pre>
742
- </td>
743
- <td>
744
- <pre class="code"><span class="info file"># File 'lib/csv_decision/table.rb', line 65</span>
893
+ <p>Returns All options, explicitly set or defaulted, used to parse the table.</p>
745
894
 
746
- <span class='kw'>def</span> <span class='id identifier rubyid_if_rows'>if_rows</span>
747
- <span class='ivar'>@if_rows</span>
748
- <span class='kw'>end</span></pre>
749
- </td>
750
- </tr>
751
- </table>
752
- </div>
753
-
754
-
755
- <span id="index=-instance_method"></span>
756
- <div class="method_details ">
757
- <h3 class="signature " id="index-instance_method">
758
-
759
- #<strong>index</strong> &#x21d2; <tt><span class='object_link'><a href="Index.html" title="CSVDecision::Index (class)">CSVDecision::Index</a></span></tt>
760
-
761
-
762
-
763
-
764
-
765
- </h3><div class="docstring">
766
- <div class="discussion">
767
-
768
- <p>Returns The index built on one or more input columns.</p>
769
895
 
896
+ </div>
897
+ </div>
898
+ <div class="tags">
770
899
 
771
- </div>
772
- </div>
773
- <div class="tags">
774
-
775
- <p class="tag_title">Returns:</p>
776
- <ul class="return">
777
-
778
- <li>
779
-
780
-
781
- <span class='type'>(<tt><span class='object_link'><a href="Index.html" title="CSVDecision::Index (class)">CSVDecision::Index</a></span></tt>)</span>
782
-
783
-
784
-
785
- &mdash;
786
- <div class='inline'>
787
- <p>The index built on one or more input columns.</p>
788
- </div>
789
-
790
- </li>
791
-
792
- </ul>
793
-
794
- </div><table class="source_code">
795
- <tr>
796
- <td>
797
- <pre class="lines">
900
+ <p class="tag_title">Returns:</p>
901
+ <ul class="return">
798
902
 
903
+ <li>
799
904
 
800
- 38
801
- 39
802
- 40</pre>
803
- </td>
804
- <td>
805
- <pre class="code"><span class="info file"># File 'lib/csv_decision/table.rb', line 38</span>
806
905
 
807
- <span class='kw'>def</span> <span class='id identifier rubyid_index'>index</span>
808
- <span class='ivar'>@index</span>
809
- <span class='kw'>end</span></pre>
810
- </td>
811
- </tr>
812
- </table>
813
- </div>
814
-
815
-
816
- <span id="options=-instance_method"></span>
817
- <div class="method_details ">
818
- <h3 class="signature " id="options-instance_method">
819
-
820
- #<strong>options</strong> &#x21d2; <tt>Hash</tt>
821
-
822
-
823
-
824
-
825
-
826
- </h3><div class="docstring">
827
- <div class="discussion">
828
-
829
- <p>Returns All options, explicitly set or defaulted, used to parse the table.</p>
906
+ <span class='type'>(<tt>Hash</tt>)</span>
830
907
 
831
908
 
832
- </div>
833
- </div>
834
- <div class="tags">
835
-
836
- <p class="tag_title">Returns:</p>
837
- <ul class="return">
838
-
839
- <li>
840
-
841
-
842
- <span class='type'>(<tt>Hash</tt>)</span>
843
-
844
-
845
-
846
- &mdash;
847
- <div class='inline'>
848
- <p>All options, explicitly set or defaulted, used to parse the table.</p>
849
- </div>
850
-
851
- </li>
852
-
853
- </ul>
854
-
855
- </div><table class="source_code">
856
- <tr>
857
- <td>
858
- <pre class="lines">
909
+
910
+ &mdash;
911
+ <div class='inline'>
912
+ <p>All options, explicitly set or defaulted, used to parse the table.</p>
913
+ </div>
914
+
915
+ </li>
916
+
917
+ </ul>
918
+
919
+ </div>
920
+ <table class="source_code">
921
+ <tr>
922
+ <td>
923
+ <pre class="lines">
859
924
 
860
925
 
861
926
  44
862
927
  45
863
928
  46</pre>
864
- </td>
865
- <td>
866
- <pre class="code"><span class="info file"># File 'lib/csv_decision/table.rb', line 44</span>
929
+ </td>
930
+ <td>
931
+ <pre class="code"><span class="info file"># File 'lib/csv_decision2/table.rb', line 44</span>
867
932
 
868
933
  <span class='kw'>def</span> <span class='id identifier rubyid_options'>options</span>
869
934
  <span class='ivar'>@options</span>
870
935
  <span class='kw'>end</span></pre>
871
- </td>
872
- </tr>
873
- </table>
874
- </div>
875
-
876
-
877
- <span id="outs_functions=-instance_method"></span>
878
- <div class="method_details ">
879
- <h3 class="signature " id="outs_functions-instance_method">
880
-
881
- #<strong>outs_functions</strong> &#x21d2; <tt>Object</tt>
882
-
883
-
884
-
885
-
886
-
887
- </h3><div class="docstring">
888
- <div class="discussion">
889
- <p class="note private">
890
- <strong>This method is part of a private API.</strong>
891
- You should avoid using this method if possible, as it may be removed or be changed in the future.
892
- </p>
893
-
894
- <p>Set if the table row has any output functions (planned feature)</p>
936
+ </td>
937
+ </tr>
938
+ </table>
939
+ </div>
895
940
 
896
941
 
897
- </div>
898
- </div>
899
- <div class="tags">
900
-
942
+ <span id="outs_functions=-instance_method"></span>
943
+ <div class="method_details ">
944
+ <h3 class="signature " id="outs_functions-instance_method">
945
+
946
+ #<strong>outs_functions</strong> &#x21d2; <tt>Object</tt>
947
+
948
+
949
+
950
+
951
+
952
+ </h3>
953
+ <div class="docstring">
954
+ <div class="discussion">
955
+ <p class="note private">
956
+ <strong>This method is part of a private API.</strong>
957
+ You should avoid using this method if possible, as it may be removed or be changed in the future.
958
+ </p>
959
+
960
+ <p>Set if the table row has any output functions (planned feature)</p>
961
+
962
+
963
+ </div>
964
+ </div>
965
+ <div class="tags">
901
966
 
902
- </div><table class="source_code">
903
- <tr>
904
- <td>
905
- <pre class="lines">
967
+
968
+ </div>
969
+ <table class="source_code">
970
+ <tr>
971
+ <td>
972
+ <pre class="lines">
906
973
 
907
974
 
908
975
  48
909
976
  49
910
977
  50</pre>
911
- </td>
912
- <td>
913
- <pre class="code"><span class="info file"># File 'lib/csv_decision/table.rb', line 48</span>
978
+ </td>
979
+ <td>
980
+ <pre class="code"><span class="info file"># File 'lib/csv_decision2/table.rb', line 48</span>
914
981
 
915
982
  <span class='kw'>def</span> <span class='id identifier rubyid_outs_functions'>outs_functions</span>
916
983
  <span class='ivar'>@outs_functions</span>
917
984
  <span class='kw'>end</span></pre>
918
- </td>
919
- </tr>
920
- </table>
921
- </div>
922
-
923
-
924
- <span id="outs_rows=-instance_method"></span>
925
- <div class="method_details ">
926
- <h3 class="signature " id="outs_rows-instance_method">
927
-
928
- #<strong>outs_rows</strong> &#x21d2; <tt>Array&lt;<span class='object_link'><a href="ScanRow.html" title="CSVDecision::ScanRow (class)">CSVDecision::ScanRow</a></span>&gt;</tt>
929
-
930
-
931
-
932
-
933
-
934
- </h3><div class="docstring">
935
- <div class="discussion">
936
- <p class="note private">
937
- <strong>This method is part of a private API.</strong>
938
- You should avoid using this method if possible, as it may be removed or be changed in the future.
939
- </p>
940
-
941
- <p>Returns Used to implement outputting of final results.</p>
985
+ </td>
986
+ </tr>
987
+ </table>
988
+ </div>
942
989
 
943
990
 
944
- </div>
945
- </div>
946
- <div class="tags">
947
-
948
- <p class="tag_title">Returns:</p>
949
- <ul class="return">
950
-
951
- <li>
952
-
953
-
954
- <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>
955
-
956
-
957
-
958
- &mdash;
959
- <div class='inline'>
960
- <p>Used to implement outputting of final results.</p>
961
- </div>
962
-
963
- </li>
964
-
965
- </ul>
966
-
967
- </div><table class="source_code">
968
- <tr>
969
- <td>
970
- <pre class="lines">
991
+ <span id="outs_rows=-instance_method"></span>
992
+ <div class="method_details ">
993
+ <h3 class="signature " id="outs_rows-instance_method">
994
+
995
+ #<strong>outs_rows</strong> &#x21d2; <tt>Array&lt;<span class='object_link'><a href="ScanRow.html"
996
+ title="CSVDecision2::ScanRow (class)">CSVDecision2::ScanRow</a></span>&gt;</tt>
997
+
998
+
999
+
1000
+
1001
+
1002
+ </h3>
1003
+ <div class="docstring">
1004
+ <div class="discussion">
1005
+ <p class="note private">
1006
+ <strong>This method is part of a private API.</strong>
1007
+ You should avoid using this method if possible, as it may be removed or be changed in the future.
1008
+ </p>
1009
+
1010
+ <p>Returns Used to implement outputting of final results.</p>
1011
+
1012
+
1013
+ </div>
1014
+ </div>
1015
+ <div class="tags">
1016
+
1017
+ <p class="tag_title">Returns:</p>
1018
+ <ul class="return">
1019
+
1020
+ <li>
1021
+
1022
+
1023
+ <span class='type'>(<tt>Array&lt;<span class='object_link'><a href="ScanRow.html"
1024
+ title="CSVDecision2::ScanRow (class)">CSVDecision2::ScanRow</a></span>&gt;</tt>)</span>
1025
+
1026
+
1027
+
1028
+ &mdash;
1029
+ <div class='inline'>
1030
+ <p>Used to implement outputting of final results.</p>
1031
+ </div>
1032
+
1033
+ </li>
1034
+
1035
+ </ul>
1036
+
1037
+ </div>
1038
+ <table class="source_code">
1039
+ <tr>
1040
+ <td>
1041
+ <pre class="lines">
971
1042
 
972
1043
 
973
1044
  61
974
1045
  62
975
1046
  63</pre>
976
- </td>
977
- <td>
978
- <pre class="code"><span class="info file"># File 'lib/csv_decision/table.rb', line 61</span>
1047
+ </td>
1048
+ <td>
1049
+ <pre class="code"><span class="info file"># File 'lib/csv_decision2/table.rb', line 61</span>
979
1050
 
980
1051
  <span class='kw'>def</span> <span class='id identifier rubyid_outs_rows'>outs_rows</span>
981
1052
  <span class='ivar'>@outs_rows</span>
982
1053
  <span class='kw'>end</span></pre>
983
- </td>
984
- </tr>
985
- </table>
986
- </div>
987
-
988
-
989
- <span id="paths=-instance_method"></span>
990
- <div class="method_details ">
991
- <h3 class="signature " id="paths-instance_method">
992
-
993
- #<strong>paths</strong> &#x21d2; <tt>CSVDecision::Path</tt>
994
-
995
-
996
-
997
-
998
-
999
- </h3><div class="docstring">
1000
- <div class="discussion">
1001
-
1002
- <p>Returns The array of paths built on one or more input columns.</p>
1054
+ </td>
1055
+ </tr>
1056
+ </table>
1057
+ </div>
1003
1058
 
1004
1059
 
1005
- </div>
1006
- </div>
1007
- <div class="tags">
1008
-
1009
- <p class="tag_title">Returns:</p>
1010
- <ul class="return">
1011
-
1012
- <li>
1013
-
1014
-
1015
- <span class='type'>(<tt>CSVDecision::Path</tt>)</span>
1016
-
1017
-
1018
-
1019
- &mdash;
1020
- <div class='inline'>
1021
- <p>The array of paths built on one or more input columns.</p>
1022
- </div>
1023
-
1024
- </li>
1025
-
1026
- </ul>
1027
-
1028
- </div><table class="source_code">
1029
- <tr>
1030
- <td>
1031
- <pre class="lines">
1060
+ <span id="paths=-instance_method"></span>
1061
+ <div class="method_details ">
1062
+ <h3 class="signature " id="paths-instance_method">
1063
+
1064
+ #<strong>paths</strong> &#x21d2; <tt>CSVDecision2::Path</tt>
1065
+
1066
+
1067
+
1068
+
1069
+
1070
+ </h3>
1071
+ <div class="docstring">
1072
+ <div class="discussion">
1073
+
1074
+ <p>Returns The array of paths built on one or more input columns.</p>
1075
+
1076
+
1077
+ </div>
1078
+ </div>
1079
+ <div class="tags">
1080
+
1081
+ <p class="tag_title">Returns:</p>
1082
+ <ul class="return">
1083
+
1084
+ <li>
1085
+
1086
+
1087
+ <span class='type'>(<tt>CSVDecision2::Path</tt>)</span>
1088
+
1089
+
1090
+
1091
+ &mdash;
1092
+ <div class='inline'>
1093
+ <p>The array of paths built on one or more input columns.</p>
1094
+ </div>
1095
+
1096
+ </li>
1097
+
1098
+ </ul>
1099
+
1100
+ </div>
1101
+ <table class="source_code">
1102
+ <tr>
1103
+ <td>
1104
+ <pre class="lines">
1032
1105
 
1033
1106
 
1034
1107
  41
1035
1108
  42
1036
1109
  43</pre>
1037
- </td>
1038
- <td>
1039
- <pre class="code"><span class="info file"># File 'lib/csv_decision/table.rb', line 41</span>
1110
+ </td>
1111
+ <td>
1112
+ <pre class="code"><span class="info file"># File 'lib/csv_decision2/table.rb', line 41</span>
1040
1113
 
1041
1114
  <span class='kw'>def</span> <span class='id identifier rubyid_paths'>paths</span>
1042
1115
  <span class='ivar'>@paths</span>
1043
1116
  <span class='kw'>end</span></pre>
1044
- </td>
1045
- </tr>
1046
- </table>
1047
- </div>
1048
-
1049
-
1050
- <span id="rows=-instance_method"></span>
1051
- <div class="method_details ">
1052
- <h3 class="signature " id="rows-instance_method">
1053
-
1054
- #<strong>rows</strong> &#x21d2; <tt>Array&lt;Array&gt;</tt>
1055
-
1056
-
1057
-
1058
-
1059
-
1060
- </h3><div class="docstring">
1061
- <div class="discussion">
1062
- <p class="note private">
1063
- <strong>This method is part of a private API.</strong>
1064
- You should avoid using this method if possible, as it may be removed or be changed in the future.
1065
- </p>
1066
-
1067
- <p>Returns Data rows after parsing.</p>
1117
+ </td>
1118
+ </tr>
1119
+ </table>
1120
+ </div>
1068
1121
 
1069
1122
 
1070
- </div>
1071
- </div>
1072
- <div class="tags">
1073
-
1074
- <p class="tag_title">Returns:</p>
1075
- <ul class="return">
1076
-
1077
- <li>
1078
-
1079
-
1080
- <span class='type'>(<tt>Array&lt;Array&gt;</tt>)</span>
1081
-
1082
-
1083
-
1084
- &mdash;
1085
- <div class='inline'>
1086
- <p>Data rows after parsing.</p>
1087
- </div>
1088
-
1089
- </li>
1090
-
1091
- </ul>
1092
-
1093
- </div><table class="source_code">
1094
- <tr>
1095
- <td>
1096
- <pre class="lines">
1123
+ <span id="rows=-instance_method"></span>
1124
+ <div class="method_details ">
1125
+ <h3 class="signature " id="rows-instance_method">
1126
+
1127
+ #<strong>rows</strong> &#x21d2; <tt>Array&lt;Array&gt;</tt>
1128
+
1129
+
1130
+
1131
+
1132
+
1133
+ </h3>
1134
+ <div class="docstring">
1135
+ <div class="discussion">
1136
+ <p class="note private">
1137
+ <strong>This method is part of a private API.</strong>
1138
+ You should avoid using this method if possible, as it may be removed or be changed in the future.
1139
+ </p>
1140
+
1141
+ <p>Returns Data rows after parsing.</p>
1142
+
1143
+
1144
+ </div>
1145
+ </div>
1146
+ <div class="tags">
1147
+
1148
+ <p class="tag_title">Returns:</p>
1149
+ <ul class="return">
1150
+
1151
+ <li>
1152
+
1153
+
1154
+ <span class='type'>(<tt>Array&lt;Array&gt;</tt>)</span>
1155
+
1156
+
1157
+
1158
+ &mdash;
1159
+ <div class='inline'>
1160
+ <p>Data rows after parsing.</p>
1161
+ </div>
1162
+
1163
+ </li>
1164
+
1165
+ </ul>
1166
+
1167
+ </div>
1168
+ <table class="source_code">
1169
+ <tr>
1170
+ <td>
1171
+ <pre class="lines">
1097
1172
 
1098
1173
 
1099
1174
  52
1100
1175
  53
1101
1176
  54</pre>
1102
- </td>
1103
- <td>
1104
- <pre class="code"><span class="info file"># File 'lib/csv_decision/table.rb', line 52</span>
1177
+ </td>
1178
+ <td>
1179
+ <pre class="code"><span class="info file"># File 'lib/csv_decision2/table.rb', line 52</span>
1105
1180
 
1106
1181
  <span class='kw'>def</span> <span class='id identifier rubyid_rows'>rows</span>
1107
1182
  <span class='ivar'>@rows</span>
1108
1183
  <span class='kw'>end</span></pre>
1109
- </td>
1110
- </tr>
1111
- </table>
1112
- </div>
1113
-
1114
-
1115
- <span id="scan_rows=-instance_method"></span>
1116
- <div class="method_details ">
1117
- <h3 class="signature " id="scan_rows-instance_method">
1118
-
1119
- #<strong>scan_rows</strong> &#x21d2; <tt>Array&lt;<span class='object_link'><a href="ScanRow.html" title="CSVDecision::ScanRow (class)">CSVDecision::ScanRow</a></span>&gt;</tt>
1120
-
1121
-
1122
-
1123
-
1124
-
1125
- </h3><div class="docstring">
1126
- <div class="discussion">
1127
- <p class="note private">
1128
- <strong>This method is part of a private API.</strong>
1129
- You should avoid using this method if possible, as it may be removed or be changed in the future.
1130
- </p>
1131
-
1132
- <p>Returns Scanning objects used to implement input matching logic.</p>
1184
+ </td>
1185
+ </tr>
1186
+ </table>
1187
+ </div>
1133
1188
 
1134
1189
 
1135
- </div>
1136
- </div>
1137
- <div class="tags">
1138
-
1139
- <p class="tag_title">Returns:</p>
1140
- <ul class="return">
1141
-
1142
- <li>
1143
-
1144
-
1145
- <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>
1146
-
1147
-
1148
-
1149
- &mdash;
1150
- <div class='inline'>
1151
- <p>Scanning objects used to implement input matching logic.</p>
1152
- </div>
1153
-
1154
- </li>
1155
-
1156
- </ul>
1157
-
1158
- </div><table class="source_code">
1159
- <tr>
1160
- <td>
1161
- <pre class="lines">
1190
+ <span id="scan_rows=-instance_method"></span>
1191
+ <div class="method_details ">
1192
+ <h3 class="signature " id="scan_rows-instance_method">
1193
+
1194
+ #<strong>scan_rows</strong> &#x21d2; <tt>Array&lt;<span class='object_link'><a href="ScanRow.html"
1195
+ title="CSVDecision2::ScanRow (class)">CSVDecision2::ScanRow</a></span>&gt;</tt>
1196
+
1197
+
1198
+
1199
+
1200
+
1201
+ </h3>
1202
+ <div class="docstring">
1203
+ <div class="discussion">
1204
+ <p class="note private">
1205
+ <strong>This method is part of a private API.</strong>
1206
+ You should avoid using this method if possible, as it may be removed or be changed in the future.
1207
+ </p>
1208
+
1209
+ <p>Returns Scanning objects used to implement input matching logic.</p>
1210
+
1211
+
1212
+ </div>
1213
+ </div>
1214
+ <div class="tags">
1215
+
1216
+ <p class="tag_title">Returns:</p>
1217
+ <ul class="return">
1218
+
1219
+ <li>
1220
+
1221
+
1222
+ <span class='type'>(<tt>Array&lt;<span class='object_link'><a href="ScanRow.html"
1223
+ title="CSVDecision2::ScanRow (class)">CSVDecision2::ScanRow</a></span>&gt;</tt>)</span>
1224
+
1225
+
1226
+
1227
+ &mdash;
1228
+ <div class='inline'>
1229
+ <p>Scanning objects used to implement input matching logic.</p>
1230
+ </div>
1231
+
1232
+ </li>
1233
+
1234
+ </ul>
1235
+
1236
+ </div>
1237
+ <table class="source_code">
1238
+ <tr>
1239
+ <td>
1240
+ <pre class="lines">
1162
1241
 
1163
1242
 
1164
1243
  57
1165
1244
  58
1166
1245
  59</pre>
1167
- </td>
1168
- <td>
1169
- <pre class="code"><span class="info file"># File 'lib/csv_decision/table.rb', line 57</span>
1246
+ </td>
1247
+ <td>
1248
+ <pre class="code"><span class="info file"># File 'lib/csv_decision2/table.rb', line 57</span>
1170
1249
 
1171
1250
  <span class='kw'>def</span> <span class='id identifier rubyid_scan_rows'>scan_rows</span>
1172
1251
  <span class='ivar'>@scan_rows</span>
1173
1252
  <span class='kw'>end</span></pre>
1174
- </td>
1175
- </tr>
1176
- </table>
1177
- </div>
1178
-
1179
- </div>
1253
+ </td>
1254
+ </tr>
1255
+ </table>
1256
+ </div>
1180
1257
 
1258
+ </div>
1181
1259
 
1182
- <div id="instance_method_details" class="method_details_list">
1183
- <h2>Instance Method Details</h2>
1184
1260
 
1185
-
1186
- <div class="method_details first">
1187
- <h3 class="signature first" id="decide-instance_method">
1188
-
1189
- #<strong>decide</strong>(input) &#x21d2; <tt>{Symbol =&gt; Object, Array&lt;Object&gt;}</tt>
1190
-
1261
+ <div id="instance_method_details" class="method_details_list">
1262
+ <h2>Instance Method Details</h2>
1191
1263
 
1192
-
1193
1264
 
1194
-
1195
- </h3><div class="docstring">
1196
- <div class="discussion">
1197
-
1198
- <div class="note notetag">
1199
- <strong>Note:</strong>
1200
- <div class='inline'>
1201
- <p>Input hash keys may or may not be symbolized.</p>
1202
- </div>
1203
- </div>
1265
+ <div class="method_details first">
1266
+ <h3 class="signature first" id="decide-instance_method">
1204
1267
 
1268
+ #<strong>decide</strong>(input) &#x21d2; <tt>{Symbol =&gt; Object, Array&lt;Object&gt;}</tt>
1205
1269
 
1206
- <p>Make a decision based off an input hash.</p>
1207
1270
 
1208
1271
 
1209
- </div>
1210
- </div>
1211
- <div class="tags">
1212
- <p class="tag_title">Parameters:</p>
1213
- <ul class="param">
1214
-
1215
- <li>
1216
-
1217
- <span class='name'>input</span>
1218
-
1219
-
1220
- <span class='type'>(<tt>Hash</tt>)</span>
1221
-
1222
-
1223
-
1224
- &mdash;
1225
- <div class='inline'>
1226
- <p>Input hash.</p>
1227
- </div>
1228
-
1229
- </li>
1230
-
1231
- </ul>
1232
-
1233
- <p class="tag_title">Returns:</p>
1234
- <ul class="return">
1235
-
1236
- <li>
1237
-
1238
-
1239
- <span class='type'>(<tt>{Symbol =&gt; Object, Array&lt;Object&gt;}</tt>)</span>
1240
-
1241
-
1242
-
1243
- &mdash;
1244
- <div class='inline'>
1245
- <p>Decision hash.</p>
1246
- </div>
1247
-
1248
- </li>
1249
-
1250
- </ul>
1251
-
1252
- </div><table class="source_code">
1253
- <tr>
1254
- <td>
1255
- <pre class="lines">
1272
+
1273
+
1274
+ </h3>
1275
+ <div class="docstring">
1276
+ <div class="discussion">
1277
+
1278
+ <div class="note notetag">
1279
+ <strong>Note:</strong>
1280
+ <div class='inline'>
1281
+ <p>Input hash keys may or may not be symbolized.</p>
1282
+ </div>
1283
+ </div>
1284
+
1285
+
1286
+ <p>Make a decision based off an input hash.</p>
1287
+
1288
+
1289
+ </div>
1290
+ </div>
1291
+ <div class="tags">
1292
+ <p class="tag_title">Parameters:</p>
1293
+ <ul class="param">
1294
+
1295
+ <li>
1296
+
1297
+ <span class='name'>input</span>
1298
+
1299
+
1300
+ <span class='type'>(<tt>Hash</tt>)</span>
1301
+
1302
+
1303
+
1304
+ &mdash;
1305
+ <div class='inline'>
1306
+ <p>Input hash.</p>
1307
+ </div>
1308
+
1309
+ </li>
1310
+
1311
+ </ul>
1312
+
1313
+ <p class="tag_title">Returns:</p>
1314
+ <ul class="return">
1315
+
1316
+ <li>
1317
+
1318
+
1319
+ <span class='type'>(<tt>{Symbol =&gt; Object, Array&lt;Object&gt;}</tt>)</span>
1320
+
1321
+
1322
+
1323
+ &mdash;
1324
+ <div class='inline'>
1325
+ <p>Decision hash.</p>
1326
+ </div>
1327
+
1328
+ </li>
1329
+
1330
+ </ul>
1331
+
1332
+ </div>
1333
+ <table class="source_code">
1334
+ <tr>
1335
+ <td>
1336
+ <pre class="lines">
1256
1337
 
1257
1338
 
1258
1339
  15
1259
1340
  16
1260
1341
  17</pre>
1261
- </td>
1262
- <td>
1263
- <pre class="code"><span class="info file"># File 'lib/csv_decision/table.rb', line 15</span>
1342
+ </td>
1343
+ <td>
1344
+ <pre class="code"><span class="info file"># File 'lib/csv_decision2/table.rb', line 15</span>
1264
1345
 
1265
1346
  <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>
1266
1347
  <span class='id identifier rubyid_decision'>decision</span><span class='lparen'>(</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>
1267
1348
  <span class='kw'>end</span></pre>
1268
- </td>
1269
- </tr>
1270
- </table>
1271
- </div>
1272
-
1273
- <div class="method_details ">
1274
- <h3 class="signature " id="decide!-instance_method">
1275
-
1276
- #<strong>decide!</strong>(input) &#x21d2; <tt>{Symbol =&gt; Object, Array&lt;Object&gt;}</tt>
1277
-
1278
-
1279
-
1280
-
1281
-
1282
- </h3><div class="docstring">
1283
- <div class="discussion">
1284
-
1285
- <div class="note notetag">
1286
- <strong>Note:</strong>
1287
- <div class='inline'>
1288
- <p>Input hash must have its keys symbolized. Input hash will be mutated by any
1289
- functions that have side effects.</p>
1290
- </div>
1291
- </div>
1349
+ </td>
1350
+ </tr>
1351
+ </table>
1352
+ </div>
1292
1353
 
1354
+ <div class="method_details ">
1355
+ <h3 class="signature " id="decide!-instance_method">
1293
1356
 
1294
- <p>Unsafe version of decide - may mutate the input hash and assumes the input
1295
- hash is symbolized.</p>
1357
+ #<strong>decide!</strong>(input) &#x21d2; <tt>{Symbol =&gt; Object, Array&lt;Object&gt;}</tt>
1296
1358
 
1297
1359
 
1298
- </div>
1299
- </div>
1300
- <div class="tags">
1301
- <p class="tag_title">Parameters:</p>
1302
- <ul class="param">
1303
-
1304
- <li>
1305
-
1306
- <span class='name'>input</span>
1307
-
1308
-
1309
- <span class='type'>(<tt>Hash</tt>)</span>
1310
-
1311
-
1312
-
1313
- &mdash;
1314
- <div class='inline'>
1315
- <p>Input hash.</p>
1316
- </div>
1317
-
1318
- </li>
1319
-
1320
- </ul>
1321
-
1322
- <p class="tag_title">Returns:</p>
1323
- <ul class="return">
1324
-
1325
- <li>
1326
-
1327
-
1328
- <span class='type'>(<tt>{Symbol =&gt; Object, Array&lt;Object&gt;}</tt>)</span>
1329
-
1330
-
1331
-
1332
- &mdash;
1333
- <div class='inline'>
1334
- <p>Decision hash.</p>
1335
- </div>
1336
-
1337
- </li>
1338
-
1339
- </ul>
1340
-
1341
- </div><table class="source_code">
1342
- <tr>
1343
- <td>
1344
- <pre class="lines">
1360
+
1361
+
1362
+
1363
+ </h3>
1364
+ <div class="docstring">
1365
+ <div class="discussion">
1366
+
1367
+ <div class="note notetag">
1368
+ <strong>Note:</strong>
1369
+ <div class='inline'>
1370
+ <p>Input hash must have its keys symbolized. Input hash will be mutated by any
1371
+ functions that have side effects.</p>
1372
+ </div>
1373
+ </div>
1374
+
1375
+
1376
+ <p>Unsafe version of decide - may mutate the input hash and assumes the input
1377
+ hash is symbolized.</p>
1378
+
1379
+
1380
+ </div>
1381
+ </div>
1382
+ <div class="tags">
1383
+ <p class="tag_title">Parameters:</p>
1384
+ <ul class="param">
1385
+
1386
+ <li>
1387
+
1388
+ <span class='name'>input</span>
1389
+
1390
+
1391
+ <span class='type'>(<tt>Hash</tt>)</span>
1392
+
1393
+
1394
+
1395
+ &mdash;
1396
+ <div class='inline'>
1397
+ <p>Input hash.</p>
1398
+ </div>
1399
+
1400
+ </li>
1401
+
1402
+ </ul>
1403
+
1404
+ <p class="tag_title">Returns:</p>
1405
+ <ul class="return">
1406
+
1407
+ <li>
1408
+
1409
+
1410
+ <span class='type'>(<tt>{Symbol =&gt; Object, Array&lt;Object&gt;}</tt>)</span>
1411
+
1412
+
1413
+
1414
+ &mdash;
1415
+ <div class='inline'>
1416
+ <p>Decision hash.</p>
1417
+ </div>
1418
+
1419
+ </li>
1420
+
1421
+ </ul>
1422
+
1423
+ </div>
1424
+ <table class="source_code">
1425
+ <tr>
1426
+ <td>
1427
+ <pre class="lines">
1345
1428
 
1346
1429
 
1347
1430
  26
1348
1431
  27
1349
1432
  28</pre>
1350
- </td>
1351
- <td>
1352
- <pre class="code"><span class="info file"># File 'lib/csv_decision/table.rb', line 26</span>
1433
+ </td>
1434
+ <td>
1435
+ <pre class="code"><span class="info file"># File 'lib/csv_decision2/table.rb', line 26</span>
1353
1436
 
1354
1437
  <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>
1355
1438
  <span class='id identifier rubyid_decision'>decision</span><span class='lparen'>(</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>
1356
1439
  <span class='kw'>end</span></pre>
1357
- </td>
1358
- </tr>
1359
- </table>
1360
- </div>
1361
-
1362
- <div class="method_details ">
1363
- <h3 class="signature " id="each-instance_method">
1364
-
1365
- #<strong>each</strong>(first = 0, last = @rows.count - 1) &#x21d2; <tt>Object</tt>
1366
-
1367
-
1368
-
1369
-
1370
-
1371
- </h3><div class="docstring">
1372
- <div class="discussion">
1373
- <p class="note private">
1374
- <strong>This method is part of a private API.</strong>
1375
- You should avoid using this method if possible, as it may be removed or be changed in the future.
1376
- </p>
1377
-
1378
- <p>Iterate through all data rows of the decision table, with an optional first
1379
- and last row index given.</p>
1440
+ </td>
1441
+ </tr>
1442
+ </table>
1443
+ </div>
1444
+
1445
+ <div class="method_details ">
1446
+ <h3 class="signature " id="each-instance_method">
1447
+
1448
+ #<strong>each</strong>(first = 0, last = @rows.count - 1) &#x21d2; <tt>Object</tt>
1449
+
1380
1450
 
1381
1451
 
1382
- </div>
1383
- </div>
1384
- <div class="tags">
1385
- <p class="tag_title">Parameters:</p>
1386
- <ul class="param">
1387
-
1388
- <li>
1389
-
1390
- <span class='name'>first</span>
1391
-
1392
-
1393
- <span class='type'>(<tt>Integer</tt>)</span>
1394
-
1395
-
1396
- <em class="default">(defaults to: <tt>0</tt>)</em>
1397
-
1398
-
1399
- &mdash;
1400
- <div class='inline'>
1401
- <p>Start row.</p>
1402
- </div>
1403
-
1404
- </li>
1405
-
1406
- <li>
1407
-
1408
- <span class='name'>last</span>
1409
-
1410
-
1411
- <span class='type'>(<tt>Integer</tt>, <tt>nil</tt>)</span>
1412
-
1413
-
1414
- <em class="default">(defaults to: <tt>@rows.count - 1</tt>)</em>
1415
-
1416
-
1417
- &mdash;
1418
- <div class='inline'>
1419
- <p>Last row.</p>
1420
- </div>
1421
-
1422
- </li>
1423
-
1424
- </ul>
1425
-
1426
-
1427
- </div><table class="source_code">
1428
- <tr>
1429
- <td>
1430
- <pre class="lines">
1452
+
1453
+
1454
+ </h3>
1455
+ <div class="docstring">
1456
+ <div class="discussion">
1457
+ <p class="note private">
1458
+ <strong>This method is part of a private API.</strong>
1459
+ You should avoid using this method if possible, as it may be removed or be changed in the future.
1460
+ </p>
1461
+
1462
+ <p>Iterate through all data rows of the decision table, with an optional first
1463
+ and last row index given.</p>
1464
+
1465
+
1466
+ </div>
1467
+ </div>
1468
+ <div class="tags">
1469
+ <p class="tag_title">Parameters:</p>
1470
+ <ul class="param">
1471
+
1472
+ <li>
1473
+
1474
+ <span class='name'>first</span>
1475
+
1476
+
1477
+ <span class='type'>(<tt>Integer</tt>)</span>
1478
+
1479
+
1480
+ <em class="default">(defaults to: <tt>0</tt>)</em>
1481
+
1482
+
1483
+ &mdash;
1484
+ <div class='inline'>
1485
+ <p>Start row.</p>
1486
+ </div>
1487
+
1488
+ </li>
1489
+
1490
+ <li>
1491
+
1492
+ <span class='name'>last</span>
1493
+
1494
+
1495
+ <span class='type'>(<tt>Integer</tt>, <tt>nil</tt>)</span>
1496
+
1497
+
1498
+ <em class="default">(defaults to: <tt>@rows.count - 1</tt>)</em>
1499
+
1500
+
1501
+ &mdash;
1502
+ <div class='inline'>
1503
+ <p>Last row.</p>
1504
+ </div>
1505
+
1506
+ </li>
1507
+
1508
+ </ul>
1509
+
1510
+
1511
+ </div>
1512
+ <table class="source_code">
1513
+ <tr>
1514
+ <td>
1515
+ <pre class="lines">
1431
1516
 
1432
1517
 
1433
1518
  73
@@ -1438,9 +1523,9 @@ and last row index given.</p>
1438
1523
  78
1439
1524
  79
1440
1525
  80</pre>
1441
- </td>
1442
- <td>
1443
- <pre class="code"><span class="info file"># File 'lib/csv_decision/table.rb', line 73</span>
1526
+ </td>
1527
+ <td>
1528
+ <pre class="code"><span class="info file"># File 'lib/csv_decision2/table.rb', line 73</span>
1444
1529
 
1445
1530
  <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>
1446
1531
  <span class='id identifier rubyid_index'>index</span> <span class='op'>=</span> <span class='id identifier rubyid_first'>first</span>
@@ -1450,21 +1535,22 @@ and last row index given.</p>
1450
1535
  <span class='id identifier rubyid_index'>index</span> <span class='op'>+=</span> <span class='int'>1</span>
1451
1536
  <span class='kw'>end</span>
1452
1537
  <span class='kw'>end</span></pre>
1453
- </td>
1454
- </tr>
1455
- </table>
1456
- </div>
1457
-
1458
- </div>
1538
+ </td>
1539
+ </tr>
1540
+ </table>
1541
+ </div>
1459
1542
 
1460
- </div>
1543
+ </div>
1461
1544
 
1462
- <div id="footer">
1463
- Generated on Sun Feb 11 10:26:08 2018 by
1464
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1465
- 0.9.12 (ruby-2.4.0).
1466
- </div>
1545
+ </div>
1467
1546
 
1547
+ <div id="footer">
1548
+ Generated on Sun Feb 11 10:26:08 2018 by
1549
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1550
+ 0.9.12 (ruby-2.4.0).
1468
1551
  </div>
1469
- </body>
1470
- </html>
1552
+
1553
+ </div>
1554
+ </body>
1555
+
1556
+ </html>