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,23 +1,24 @@
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::Result
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::Result
9
+
9
10
  &mdash; Documentation by YARD 0.9.12
10
-
11
- </title>
11
+
12
+ </title>
12
13
 
13
14
  <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
14
15
 
15
16
  <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
16
17
 
17
- <script type="text/javascript" charset="utf-8">
18
- pathId = "CSVDecision::Result";
19
- relpath = '../';
20
- </script>
18
+ <script type="text/javascript" charset="utf-8">
19
+ pathId = "CSVDecision2::Result";
20
+ relpath = '../';
21
+ </script>
21
22
 
22
23
 
23
24
  <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
@@ -25,450 +26,491 @@
25
26
  <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
26
27
 
27
28
 
28
- </head>
29
- <body>
30
- <div class="nav_wrap">
31
- <iframe id="nav" src="../class_list.html?1"></iframe>
32
- <div id="resizer"></div>
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 (R)</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">Result</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>
33
62
  </div>
34
63
 
35
- <div id="main" tabindex="-1">
36
- <div id="header">
37
- <div id="menu">
38
-
39
- <a href="../_index.html">Index (R)</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">Result</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>
64
+ <div id="content">
65
+ <h1>Class: CSVDecision2::Result
66
+
67
+
68
+ <span class="private note title">Private</span>
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::Result</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/result.rb</dd>
101
+ </dl>
102
+
60
103
  </div>
61
104
 
62
- <div id="content"><h1>Class: CSVDecision::Result
63
-
64
-
65
- <span class="private note title">Private</span>
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::Result</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/result.rb</dd>
98
- </dl>
99
-
100
- </div>
101
-
102
- <h2>Overview</h2><div class="docstring">
103
- <div class="discussion">
104
- <p class="note private">
105
- <strong>This class is part of a private API.</strong>
106
- You should avoid using this class if possible, as it may be removed or be changed in the future.
107
- </p>
108
-
109
- <p>Accumulate the matching row(s) into a result hash.</p>
105
+ <h2>Overview</h2>
106
+ <div class="docstring">
107
+ <div class="discussion">
108
+ <p class="note private">
109
+ <strong>This class is part of a private API.</strong>
110
+ You should avoid using this class if possible, as it may be removed or be changed in the future.
111
+ </p>
110
112
 
113
+ <p>Accumulate the matching row(s) into a result hash.</p>
114
+
115
+
116
+ </div>
117
+ </div>
118
+ <div class="tags">
119
+
120
+
121
+ </div>
122
+
123
+
124
+
125
+ <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
126
+ <ul class="summary">
111
127
 
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="#attributes-instance_method" title="#attributes (instance method)">#<strong>attributes</strong> &#x21d2; Hash{Symbol=&gt;Object}, Hash{Integer=&gt;Object} </a>
128
-
129
-
130
-
131
- </span>
132
-
133
-
134
-
135
-
136
- <span class="note title readonly">readonly</span>
137
-
138
-
139
-
140
-
141
-
142
-
143
- <span class="private note title">private</span>
144
-
145
-
146
- <span class="summary_desc"><div class='inline'>
147
- <p>The decision result hash containing both result values and if: columns,
148
- which eventually get evaluated and removed.</p>
149
- </div></span>
150
-
151
- </li>
152
-
153
-
154
- <li class="public ">
155
- <span class="summary_signature">
156
-
157
- <a href="#multi_result-instance_method" title="#multi_result (instance method)">#<strong>multi_result</strong> &#x21d2; Boolean </a>
158
-
159
-
160
-
161
- </span>
162
-
163
-
164
-
165
-
166
- <span class="note title readonly">readonly</span>
167
-
168
-
169
-
170
-
171
-
172
-
173
- <span class="private note title">private</span>
174
-
175
-
176
- <span class="summary_desc"><div class='inline'>
177
- <p>Returns true if this is a multi-row result.</p>
178
- </div></span>
179
-
180
- </li>
181
-
182
-
183
- <li class="public ">
184
- <span class="summary_signature">
185
-
186
- <a href="#outs-instance_method" title="#outs (instance method)">#<strong>outs</strong> &#x21d2; Hash{Index=&gt;Dictionary::Entry} </a>
187
-
188
-
189
-
190
- </span>
191
-
192
-
193
-
194
-
195
- <span class="note title readonly">readonly</span>
196
-
197
-
198
-
199
-
200
-
201
-
202
- <span class="private note title">private</span>
203
-
204
-
205
- <span class="summary_desc"><div class='inline'>
206
- <p>Output columns.</p>
207
- </div></span>
208
-
209
- </li>
210
-
211
-
212
- <li class="public ">
213
- <span class="summary_signature">
214
-
215
- <a href="#outs_functions-instance_method" title="#outs_functions (instance method)">#<strong>outs_functions</strong> &#x21d2; nil, true </a>
216
-
217
-
218
-
219
- </span>
220
-
221
-
222
-
223
-
224
- <span class="note title readonly">readonly</span>
225
-
226
-
227
-
228
-
229
-
230
-
231
- <span class="private note title">private</span>
232
-
233
-
234
- <span class="summary_desc"><div class='inline'>
235
- <p>Set to true if the table has output functions.</p>
236
- </div></span>
237
-
238
- </li>
239
-
240
-
241
- </ul>
242
-
243
-
244
-
245
-
246
-
247
- <h2>
248
- Instance Method Summary
249
- <small><a href="#" class="summary_toggle">collapse</a></small>
250
- </h2>
251
-
252
- <ul class="summary">
253
-
254
128
  <li class="public ">
255
- <span class="summary_signature">
256
-
257
- <a href="#accumulate_outs-instance_method" title="#accumulate_outs (instance method)">#<strong>accumulate_outs</strong>(row) &#x21d2; void </a>
258
-
259
-
260
-
261
- </span>
262
-
263
-
264
-
265
-
266
-
267
-
268
- <span class="private note title">private</span>
269
-
270
-
271
- <span class="summary_desc"><div class='inline'>
272
- <p>Accumulate the outs into arrays of values.</p>
273
- </div></span>
274
-
275
- </li>
276
-
277
-
129
+ <span class="summary_signature">
130
+
131
+ <a href="#attributes-instance_method" title="#attributes (instance method)">#<strong>attributes</strong>
132
+ &#x21d2; Hash{Symbol=&gt;Object}, Hash{Integer=&gt;Object} </a>
133
+
134
+
135
+
136
+ </span>
137
+
138
+
139
+
140
+
141
+ <span class="note title readonly">readonly</span>
142
+
143
+
144
+
145
+
146
+
147
+
148
+ <span class="private note title">private</span>
149
+
150
+
151
+ <span class="summary_desc">
152
+ <div class='inline'>
153
+ <p>The decision result hash containing both result values and if: columns,
154
+ which eventually get evaluated and removed.</p>
155
+ </div>
156
+ </span>
157
+
158
+ </li>
159
+
160
+
278
161
  <li class="public ">
279
- <span class="summary_signature">
280
-
281
- <a href="#add_outs-instance_method" title="#add_outs (instance method)">#<strong>add_outs</strong>(row) &#x21d2; void </a>
282
-
283
-
284
-
285
- </span>
286
-
287
-
288
-
289
-
290
-
291
-
292
- <span class="private note title">private</span>
293
-
294
-
295
- <span class="summary_desc"><div class='inline'>
296
- <p>Common case for building a single row result is just copying output column
297
- values to the final result hash.</p>
298
- </div></span>
299
-
300
- </li>
301
-
302
-
162
+ <span class="summary_signature">
163
+
164
+ <a href="#multi_result-instance_method"
165
+ title="#multi_result (instance method)">#<strong>multi_result</strong> &#x21d2; Boolean </a>
166
+
167
+
168
+
169
+ </span>
170
+
171
+
172
+
173
+
174
+ <span class="note title readonly">readonly</span>
175
+
176
+
177
+
178
+
179
+
180
+
181
+ <span class="private note title">private</span>
182
+
183
+
184
+ <span class="summary_desc">
185
+ <div class='inline'>
186
+ <p>Returns true if this is a multi-row result.</p>
187
+ </div>
188
+ </span>
189
+
190
+ </li>
191
+
192
+
303
193
  <li class="public ">
304
- <span class="summary_signature">
305
-
306
- <a href="#eval_cell_proc-instance_method" title="#eval_cell_proc (instance method)">#<strong>eval_cell_proc</strong>(proc:, column_name:, index:) &#x21d2; Object </a>
307
-
308
-
309
-
310
- </span>
311
-
312
-
313
-
314
-
315
-
316
-
317
- <span class="private note title">private</span>
318
-
319
-
320
- <span class="summary_desc"><div class='inline'>
321
- <p>Evaluate the cell proc using the partial result calculated so far.</p>
322
- </div></span>
323
-
324
- </li>
325
-
326
-
194
+ <span class="summary_signature">
195
+
196
+ <a href="#outs-instance_method" title="#outs (instance method)">#<strong>outs</strong> &#x21d2;
197
+ Hash{Index=&gt;Dictionary::Entry} </a>
198
+
199
+
200
+
201
+ </span>
202
+
203
+
204
+
205
+
206
+ <span class="note title readonly">readonly</span>
207
+
208
+
209
+
210
+
211
+
212
+
213
+ <span class="private note title">private</span>
214
+
215
+
216
+ <span class="summary_desc">
217
+ <div class='inline'>
218
+ <p>Output columns.</p>
219
+ </div>
220
+ </span>
221
+
222
+ </li>
223
+
224
+
327
225
  <li class="public ">
328
- <span class="summary_signature">
329
-
330
- <a href="#eval_outs-instance_method" title="#eval_outs (instance method)">#<strong>eval_outs</strong>(row) &#x21d2; Object </a>
331
-
332
-
333
-
334
- </span>
335
-
336
-
337
-
338
-
339
-
340
-
341
- <span class="private note title">private</span>
342
-
343
-
344
- <span class="summary_desc"><div class='inline'>
345
- <p>Evaluate the output columns, and use them to start building the final
346
- result, along with the partial result required to evaluate functions.</p>
347
- </div></span>
348
-
349
- </li>
350
-
351
-
226
+ <span class="summary_signature">
227
+
228
+ <a href="#outs_functions-instance_method"
229
+ title="#outs_functions (instance method)">#<strong>outs_functions</strong> &#x21d2; nil, true </a>
230
+
231
+
232
+
233
+ </span>
234
+
235
+
236
+
237
+
238
+ <span class="note title readonly">readonly</span>
239
+
240
+
241
+
242
+
243
+
244
+
245
+ <span class="private note title">private</span>
246
+
247
+
248
+ <span class="summary_desc">
249
+ <div class='inline'>
250
+ <p>Set to true if the table has output functions.</p>
251
+ </div>
252
+ </span>
253
+
254
+ </li>
255
+
256
+
257
+ </ul>
258
+
259
+
260
+
261
+
262
+
263
+ <h2>
264
+ Instance Method Summary
265
+ <small><a href="#" class="summary_toggle">collapse</a></small>
266
+ </h2>
267
+
268
+ <ul class="summary">
269
+
352
270
  <li class="public ">
353
- <span class="summary_signature">
354
-
355
- <a href="#final_result-instance_method" title="#final_result (instance method)">#<strong>final_result</strong> &#x21d2; Hash{Symbol=&gt;Object} </a>
356
-
357
-
358
-
359
- </span>
360
-
361
-
362
-
363
-
364
-
365
-
366
- <span class="private note title">private</span>
367
-
368
-
369
- <span class="summary_desc"><div class='inline'>
370
- <p>Derive the final result.</p>
371
- </div></span>
372
-
373
- </li>
374
-
375
-
271
+ <span class="summary_signature">
272
+
273
+ <a href="#accumulate_outs-instance_method"
274
+ title="#accumulate_outs (instance method)">#<strong>accumulate_outs</strong>(row) &#x21d2; void </a>
275
+
276
+
277
+
278
+ </span>
279
+
280
+
281
+
282
+
283
+
284
+
285
+ <span class="private note title">private</span>
286
+
287
+
288
+ <span class="summary_desc">
289
+ <div class='inline'>
290
+ <p>Accumulate the outs into arrays of values.</p>
291
+ </div>
292
+ </span>
293
+
294
+ </li>
295
+
296
+
376
297
  <li class="public ">
377
- <span class="summary_signature">
378
-
379
- <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(table:) &#x21d2; Object </a>
380
-
381
-
382
-
383
- </span>
384
-
385
-
386
- <span class="note title constructor">constructor</span>
387
-
388
-
389
-
390
-
391
-
392
-
393
-
394
-
395
- <span class="summary_desc"><div class='inline'></div></span>
396
-
397
- </li>
398
-
399
-
298
+ <span class="summary_signature">
299
+
300
+ <a href="#add_outs-instance_method" title="#add_outs (instance method)">#<strong>add_outs</strong>(row)
301
+ &#x21d2; void </a>
302
+
303
+
304
+
305
+ </span>
306
+
307
+
308
+
309
+
310
+
311
+
312
+ <span class="private note title">private</span>
313
+
314
+
315
+ <span class="summary_desc">
316
+ <div class='inline'>
317
+ <p>Common case for building a single row result is just copying output column
318
+ values to the final result hash.</p>
319
+ </div>
320
+ </span>
321
+
322
+ </li>
323
+
324
+
400
325
  <li class="public ">
401
- <span class="summary_signature">
402
-
403
- <a href="#input-instance_method" title="#input (instance method)">#<strong>input</strong>(data) &#x21d2; void </a>
404
-
405
-
406
-
407
- </span>
408
-
409
-
410
-
411
-
412
-
413
-
414
- <span class="private note title">private</span>
415
-
416
-
417
- <span class="summary_desc"><div class='inline'>
418
- <p>Initialize the object for new input data.</p>
419
- </div></span>
420
-
421
- </li>
422
-
423
-
424
- </ul>
425
-
426
-
427
- <div id="constructor_details" class="method_details_list">
428
- <h2>Constructor Details</h2>
429
-
430
- <div class="method_details first">
431
- <h3 class="signature first" id="initialize-instance_method">
432
-
433
- #<strong>initialize</strong>(table:) &#x21d2; <tt>Object</tt>
434
-
435
-
436
-
437
-
438
-
439
- </h3><div class="docstring">
440
- <div class="discussion">
441
-
326
+ <span class="summary_signature">
442
327
 
443
- </div>
444
- </div>
445
- <div class="tags">
446
- <p class="tag_title">Parameters:</p>
447
- <ul class="param">
448
-
449
- <li>
450
-
451
- <span class='name'>table</span>
452
-
453
-
454
- <span class='type'>(<tt><span class='object_link'><a href="Table.html" title="CSVDecision::Table (class)">CSVDecision::Table</a></span></tt>)</span>
455
-
456
-
457
-
458
- &mdash;
459
- <div class='inline'>
460
- <p>Decision table being processed.</p>
461
- </div>
462
-
463
- </li>
464
-
465
- </ul>
466
-
467
-
468
- </div><table class="source_code">
469
- <tr>
470
- <td>
471
- <pre class="lines">
328
+ <a href="#eval_cell_proc-instance_method"
329
+ title="#eval_cell_proc (instance method)">#<strong>eval_cell_proc</strong>(proc:, column_name:, index:)
330
+ &#x21d2; Object </a>
331
+
332
+
333
+
334
+ </span>
335
+
336
+
337
+
338
+
339
+
340
+
341
+ <span class="private note title">private</span>
342
+
343
+
344
+ <span class="summary_desc">
345
+ <div class='inline'>
346
+ <p>Evaluate the cell proc using the partial result calculated so far.</p>
347
+ </div>
348
+ </span>
349
+
350
+ </li>
351
+
352
+
353
+ <li class="public ">
354
+ <span class="summary_signature">
355
+
356
+ <a href="#eval_outs-instance_method" title="#eval_outs (instance method)">#<strong>eval_outs</strong>(row)
357
+ &#x21d2; Object </a>
358
+
359
+
360
+
361
+ </span>
362
+
363
+
364
+
365
+
366
+
367
+
368
+ <span class="private note title">private</span>
369
+
370
+
371
+ <span class="summary_desc">
372
+ <div class='inline'>
373
+ <p>Evaluate the output columns, and use them to start building the final
374
+ result, along with the partial result required to evaluate functions.</p>
375
+ </div>
376
+ </span>
377
+
378
+ </li>
379
+
380
+
381
+ <li class="public ">
382
+ <span class="summary_signature">
383
+
384
+ <a href="#final_result-instance_method"
385
+ title="#final_result (instance method)">#<strong>final_result</strong> &#x21d2; Hash{Symbol=&gt;Object}
386
+ </a>
387
+
388
+
389
+
390
+ </span>
391
+
392
+
393
+
394
+
395
+
396
+
397
+ <span class="private note title">private</span>
398
+
399
+
400
+ <span class="summary_desc">
401
+ <div class='inline'>
402
+ <p>Derive the final result.</p>
403
+ </div>
404
+ </span>
405
+
406
+ </li>
407
+
408
+
409
+ <li class="public ">
410
+ <span class="summary_signature">
411
+
412
+ <a href="#initialize-instance_method"
413
+ title="#initialize (instance method)">#<strong>initialize</strong>(table:) &#x21d2; Object </a>
414
+
415
+
416
+
417
+ </span>
418
+
419
+
420
+ <span class="note title constructor">constructor</span>
421
+
422
+
423
+
424
+
425
+
426
+
427
+
428
+
429
+ <span class="summary_desc">
430
+ <div class='inline'></div>
431
+ </span>
432
+
433
+ </li>
434
+
435
+
436
+ <li class="public ">
437
+ <span class="summary_signature">
438
+
439
+ <a href="#input-instance_method" title="#input (instance method)">#<strong>input</strong>(data) &#x21d2;
440
+ void </a>
441
+
442
+
443
+
444
+ </span>
445
+
446
+
447
+
448
+
449
+
450
+
451
+ <span class="private note title">private</span>
452
+
453
+
454
+ <span class="summary_desc">
455
+ <div class='inline'>
456
+ <p>Initialize the object for new input data.</p>
457
+ </div>
458
+ </span>
459
+
460
+ </li>
461
+
462
+
463
+ </ul>
464
+
465
+
466
+ <div id="constructor_details" class="method_details_list">
467
+ <h2>Constructor Details</h2>
468
+
469
+ <div class="method_details first">
470
+ <h3 class="signature first" id="initialize-instance_method">
471
+
472
+ #<strong>initialize</strong>(table:) &#x21d2; <tt>Object</tt>
473
+
474
+
475
+
476
+
477
+
478
+ </h3>
479
+ <div class="docstring">
480
+ <div class="discussion">
481
+
482
+
483
+ </div>
484
+ </div>
485
+ <div class="tags">
486
+ <p class="tag_title">Parameters:</p>
487
+ <ul class="param">
488
+
489
+ <li>
490
+
491
+ <span class='name'>table</span>
492
+
493
+
494
+ <span class='type'>(<tt><span class='object_link'><a href="Table.html"
495
+ title="CSVDecision2::Table (class)">CSVDecision2::Table</a></span></tt>)</span>
496
+
497
+
498
+
499
+ &mdash;
500
+ <div class='inline'>
501
+ <p>Decision table being processed.</p>
502
+ </div>
503
+
504
+ </li>
505
+
506
+ </ul>
507
+
508
+
509
+ </div>
510
+ <table class="source_code">
511
+ <tr>
512
+ <td>
513
+ <pre class="lines">
472
514
 
473
515
 
474
516
  25
@@ -476,541 +518,565 @@ result, along with the partial result required to evaluate functions.</p>
476
518
  27
477
519
  28
478
520
  29</pre>
479
- </td>
480
- <td>
481
- <pre class="code"><span class="info file"># File 'lib/csv_decision/result.rb', line 25</span>
521
+ </td>
522
+ <td>
523
+ <pre class="code"><span class="info file"># File 'lib/csv_decision2/result.rb', line 25</span>
482
524
 
483
525
  <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='label'>table:</span><span class='rparen'>)</span>
484
526
  <span class='ivar'>@outs</span> <span class='op'>=</span> <span class='id identifier rubyid_table'>table</span><span class='period'>.</span><span class='id identifier rubyid_columns'>columns</span><span class='period'>.</span><span class='id identifier rubyid_outs'>outs</span>
485
527
  <span class='ivar'>@outs_functions</span> <span class='op'>=</span> <span class='id identifier rubyid_table'>table</span><span class='period'>.</span><span class='id identifier rubyid_outs_functions'>outs_functions</span>
486
528
  <span class='ivar'>@table</span> <span class='op'>=</span> <span class='id identifier rubyid_table'>table</span>
487
529
  <span class='kw'>end</span></pre>
488
- </td>
489
- </tr>
490
- </table>
491
- </div>
492
-
493
- </div>
494
-
495
- <div id="instance_attr_details" class="attr_details">
496
- <h2>Instance Attribute Details</h2>
497
-
498
-
499
- <span id=""></span>
500
- <div class="method_details first">
501
- <h3 class="signature first" id="attributes-instance_method">
502
-
503
- #<strong>attributes</strong> &#x21d2; <tt>Hash{Symbol=&gt;Object}</tt>, <tt>Hash{Integer=&gt;Object}</tt> <span class="extras">(readonly)</span>
504
-
505
-
506
-
507
-
508
-
509
- </h3><div class="docstring">
510
- <div class="discussion">
511
- <p class="note private">
512
- <strong>This method is part of a private API.</strong>
513
- You should avoid using this method if possible, as it may be removed or be changed in the future.
514
- </p>
515
-
516
- <p>Returns The decision result hash containing both result values and if:
517
- columns, which eventually get evaluated and removed.</p>
530
+ </td>
531
+ </tr>
532
+ </table>
533
+ </div>
534
+
535
+ </div>
536
+
537
+ <div id="instance_attr_details" class="attr_details">
538
+ <h2>Instance Attribute Details</h2>
539
+
540
+
541
+ <span id=""></span>
542
+ <div class="method_details first">
543
+ <h3 class="signature first" id="attributes-instance_method">
544
+
545
+ #<strong>attributes</strong> &#x21d2; <tt>Hash{Symbol=&gt;Object}</tt>, <tt>Hash{Integer=&gt;Object}</tt>
546
+ <span class="extras">(readonly)</span>
547
+
518
548
 
519
549
 
520
- </div>
521
- </div>
522
- <div class="tags">
523
-
524
- <p class="tag_title">Returns:</p>
525
- <ul class="return">
526
-
527
- <li>
528
-
529
-
530
- <span class='type'>(<tt>Hash{Symbol=&gt;Object}</tt>, <tt>Hash{Integer=&gt;Object}</tt>)</span>
531
-
532
-
533
-
534
- &mdash;
535
- <div class='inline'>
536
- <p>The decision result hash containing both result values and if: columns,
537
- which eventually get evaluated and removed.</p>
538
- </div>
539
-
540
- </li>
541
-
542
- </ul>
543
-
544
- </div><table class="source_code">
545
- <tr>
546
- <td>
547
- <pre class="lines">
550
+
551
+
552
+ </h3>
553
+ <div class="docstring">
554
+ <div class="discussion">
555
+ <p class="note private">
556
+ <strong>This method is part of a private API.</strong>
557
+ You should avoid using this method if possible, as it may be removed or be changed in the future.
558
+ </p>
559
+
560
+ <p>Returns The decision result hash containing both result values and if:
561
+ columns, which eventually get evaluated and removed.</p>
562
+
563
+
564
+ </div>
565
+ </div>
566
+ <div class="tags">
567
+
568
+ <p class="tag_title">Returns:</p>
569
+ <ul class="return">
570
+
571
+ <li>
572
+
573
+
574
+ <span class='type'>(<tt>Hash{Symbol=&gt;Object}</tt>, <tt>Hash{Integer=&gt;Object}</tt>)</span>
575
+
576
+
577
+
578
+ &mdash;
579
+ <div class='inline'>
580
+ <p>The decision result hash containing both result values and if: columns,
581
+ which eventually get evaluated and removed.</p>
582
+ </div>
583
+
584
+ </li>
585
+
586
+ </ul>
587
+
588
+ </div>
589
+ <table class="source_code">
590
+ <tr>
591
+ <td>
592
+ <pre class="lines">
548
593
 
549
594
 
550
595
  13
551
596
  14
552
597
  15</pre>
553
- </td>
554
- <td>
555
- <pre class="code"><span class="info file"># File 'lib/csv_decision/result.rb', line 13</span>
598
+ </td>
599
+ <td>
600
+ <pre class="code"><span class="info file"># File 'lib/csv_decision2/result.rb', line 13</span>
556
601
 
557
602
  <span class='kw'>def</span> <span class='id identifier rubyid_attributes'>attributes</span>
558
603
  <span class='ivar'>@attributes</span>
559
604
  <span class='kw'>end</span></pre>
560
- </td>
561
- </tr>
562
- </table>
563
- </div>
564
-
565
-
566
- <span id=""></span>
567
- <div class="method_details ">
568
- <h3 class="signature " id="multi_result-instance_method">
569
-
570
- #<strong>multi_result</strong> &#x21d2; <tt>Boolean</tt> <span class="extras">(readonly)</span>
571
-
572
-
573
-
574
-
575
-
576
- </h3><div class="docstring">
577
- <div class="discussion">
578
- <p class="note private">
579
- <strong>This method is part of a private API.</strong>
580
- You should avoid using this method if possible, as it may be removed or be changed in the future.
581
- </p>
582
-
583
- <p>Returns true if this is a multi-row result</p>
605
+ </td>
606
+ </tr>
607
+ </table>
608
+ </div>
584
609
 
585
610
 
586
- </div>
587
- </div>
588
- <div class="tags">
589
-
590
- <p class="tag_title">Returns:</p>
591
- <ul class="return">
592
-
593
- <li>
594
-
595
-
596
- <span class='type'>(<tt>Boolean</tt>)</span>
597
-
598
-
599
-
600
- &mdash;
601
- <div class='inline'>
602
- <p>Returns true if this is a multi-row result</p>
603
- </div>
604
-
605
- </li>
606
-
607
- </ul>
608
-
609
- </div><table class="source_code">
610
- <tr>
611
- <td>
612
- <pre class="lines">
611
+ <span id=""></span>
612
+ <div class="method_details ">
613
+ <h3 class="signature " id="multi_result-instance_method">
614
+
615
+ #<strong>multi_result</strong> &#x21d2; <tt>Boolean</tt> <span class="extras">(readonly)</span>
616
+
617
+
618
+
619
+
620
+
621
+ </h3>
622
+ <div class="docstring">
623
+ <div class="discussion">
624
+ <p class="note private">
625
+ <strong>This method is part of a private API.</strong>
626
+ You should avoid using this method if possible, as it may be removed or be changed in the future.
627
+ </p>
628
+
629
+ <p>Returns true if this is a multi-row result</p>
630
+
631
+
632
+ </div>
633
+ </div>
634
+ <div class="tags">
635
+
636
+ <p class="tag_title">Returns:</p>
637
+ <ul class="return">
638
+
639
+ <li>
640
+
641
+
642
+ <span class='type'>(<tt>Boolean</tt>)</span>
643
+
644
+
645
+
646
+ &mdash;
647
+ <div class='inline'>
648
+ <p>Returns true if this is a multi-row result</p>
649
+ </div>
650
+
651
+ </li>
652
+
653
+ </ul>
654
+
655
+ </div>
656
+ <table class="source_code">
657
+ <tr>
658
+ <td>
659
+ <pre class="lines">
613
660
 
614
661
 
615
662
  22
616
663
  23
617
664
  24</pre>
618
- </td>
619
- <td>
620
- <pre class="code"><span class="info file"># File 'lib/csv_decision/result.rb', line 22</span>
665
+ </td>
666
+ <td>
667
+ <pre class="code"><span class="info file"># File 'lib/csv_decision2/result.rb', line 22</span>
621
668
 
622
669
  <span class='kw'>def</span> <span class='id identifier rubyid_multi_result'>multi_result</span>
623
670
  <span class='ivar'>@multi_result</span>
624
671
  <span class='kw'>end</span></pre>
625
- </td>
626
- </tr>
627
- </table>
628
- </div>
629
-
630
-
631
- <span id=""></span>
632
- <div class="method_details ">
633
- <h3 class="signature " id="outs-instance_method">
634
-
635
- #<strong>outs</strong> &#x21d2; <tt>Hash{<span class='object_link'><a href="Index.html" title="CSVDecision::Index (class)">Index</a></span>=&gt;<span class='object_link'><a href="Dictionary/Entry.html" title="CSVDecision::Dictionary::Entry (class)">Dictionary::Entry</a></span>}</tt> <span class="extras">(readonly)</span>
636
-
637
-
638
-
639
-
640
-
641
- </h3><div class="docstring">
642
- <div class="discussion">
643
- <p class="note private">
644
- <strong>This method is part of a private API.</strong>
645
- You should avoid using this method if possible, as it may be removed or be changed in the future.
646
- </p>
647
-
648
- <p>Returns Output columns.</p>
672
+ </td>
673
+ </tr>
674
+ </table>
675
+ </div>
649
676
 
650
677
 
651
- </div>
652
- </div>
653
- <div class="tags">
654
-
655
- <p class="tag_title">Returns:</p>
656
- <ul class="return">
657
-
658
- <li>
659
-
660
-
661
- <span class='type'>(<tt>Hash{<span class='object_link'><a href="Index.html" title="CSVDecision::Index (class)">Index</a></span>=&gt;<span class='object_link'><a href="Dictionary/Entry.html" title="CSVDecision::Dictionary::Entry (class)">Dictionary::Entry</a></span>}</tt>)</span>
662
-
663
-
664
-
665
- &mdash;
666
- <div class='inline'>
667
- <p>Output columns.</p>
668
- </div>
669
-
670
- </li>
671
-
672
- </ul>
673
-
674
- </div><table class="source_code">
675
- <tr>
676
- <td>
677
- <pre class="lines">
678
+ <span id=""></span>
679
+ <div class="method_details ">
680
+ <h3 class="signature " id="outs-instance_method">
681
+
682
+ #<strong>outs</strong> &#x21d2; <tt>Hash{<span class='object_link'><a href="Index.html"
683
+ title="CSVDecision2::Index (class)">Index</a></span>=&gt;<span class='object_link'><a
684
+ href="Dictionary/Entry.html"
685
+ title="CSVDecision2::Dictionary::Entry (class)">Dictionary::Entry</a></span>}</tt> <span
686
+ class="extras">(readonly)</span>
687
+
688
+
689
+
690
+
691
+
692
+ </h3>
693
+ <div class="docstring">
694
+ <div class="discussion">
695
+ <p class="note private">
696
+ <strong>This method is part of a private API.</strong>
697
+ You should avoid using this method if possible, as it may be removed or be changed in the future.
698
+ </p>
699
+
700
+ <p>Returns Output columns.</p>
701
+
702
+
703
+ </div>
704
+ </div>
705
+ <div class="tags">
706
+
707
+ <p class="tag_title">Returns:</p>
708
+ <ul class="return">
709
+
710
+ <li>
711
+
712
+
713
+ <span class='type'>(<tt>Hash{<span class='object_link'><a href="Index.html"
714
+ title="CSVDecision2::Index (class)">Index</a></span>=&gt;<span class='object_link'><a
715
+ href="Dictionary/Entry.html"
716
+ title="CSVDecision2::Dictionary::Entry (class)">Dictionary::Entry</a></span>}</tt>)</span>
717
+
718
+
719
+
720
+ &mdash;
721
+ <div class='inline'>
722
+ <p>Output columns.</p>
723
+ </div>
724
+
725
+ </li>
726
+
727
+ </ul>
728
+
729
+ </div>
730
+ <table class="source_code">
731
+ <tr>
732
+ <td>
733
+ <pre class="lines">
678
734
 
679
735
 
680
736
  16
681
737
  17
682
738
  18</pre>
683
- </td>
684
- <td>
685
- <pre class="code"><span class="info file"># File 'lib/csv_decision/result.rb', line 16</span>
739
+ </td>
740
+ <td>
741
+ <pre class="code"><span class="info file"># File 'lib/csv_decision2/result.rb', line 16</span>
686
742
 
687
743
  <span class='kw'>def</span> <span class='id identifier rubyid_outs'>outs</span>
688
744
  <span class='ivar'>@outs</span>
689
745
  <span class='kw'>end</span></pre>
690
- </td>
691
- </tr>
692
- </table>
693
- </div>
694
-
695
-
696
- <span id=""></span>
697
- <div class="method_details ">
698
- <h3 class="signature " id="outs_functions-instance_method">
699
-
700
- #<strong>outs_functions</strong> &#x21d2; <tt>nil</tt>, <tt>true</tt> <span class="extras">(readonly)</span>
701
-
702
-
703
-
704
-
705
-
706
- </h3><div class="docstring">
707
- <div class="discussion">
708
- <p class="note private">
709
- <strong>This method is part of a private API.</strong>
710
- You should avoid using this method if possible, as it may be removed or be changed in the future.
711
- </p>
712
-
713
- <p>Returns Set to true if the table has output functions.</p>
746
+ </td>
747
+ </tr>
748
+ </table>
749
+ </div>
750
+
751
+
752
+ <span id=""></span>
753
+ <div class="method_details ">
754
+ <h3 class="signature " id="outs_functions-instance_method">
755
+
756
+ #<strong>outs_functions</strong> &#x21d2; <tt>nil</tt>, <tt>true</tt> <span class="extras">(readonly)</span>
757
+
714
758
 
715
759
 
716
- </div>
717
- </div>
718
- <div class="tags">
719
-
720
- <p class="tag_title">Returns:</p>
721
- <ul class="return">
722
-
723
- <li>
724
-
725
-
726
- <span class='type'>(<tt>nil</tt>, <tt>true</tt>)</span>
727
-
728
-
729
-
730
- &mdash;
731
- <div class='inline'>
732
- <p>Set to true if the table has output functions.</p>
733
- </div>
734
-
735
- </li>
736
-
737
- </ul>
738
-
739
- </div><table class="source_code">
740
- <tr>
741
- <td>
742
- <pre class="lines">
760
+
761
+
762
+ </h3>
763
+ <div class="docstring">
764
+ <div class="discussion">
765
+ <p class="note private">
766
+ <strong>This method is part of a private API.</strong>
767
+ You should avoid using this method if possible, as it may be removed or be changed in the future.
768
+ </p>
769
+
770
+ <p>Returns Set to true if the table has output functions.</p>
771
+
772
+
773
+ </div>
774
+ </div>
775
+ <div class="tags">
776
+
777
+ <p class="tag_title">Returns:</p>
778
+ <ul class="return">
779
+
780
+ <li>
781
+
782
+
783
+ <span class='type'>(<tt>nil</tt>, <tt>true</tt>)</span>
784
+
785
+
786
+
787
+ &mdash;
788
+ <div class='inline'>
789
+ <p>Set to true if the table has output functions.</p>
790
+ </div>
791
+
792
+ </li>
793
+
794
+ </ul>
795
+
796
+ </div>
797
+ <table class="source_code">
798
+ <tr>
799
+ <td>
800
+ <pre class="lines">
743
801
 
744
802
 
745
803
  19
746
804
  20
747
805
  21</pre>
748
- </td>
749
- <td>
750
- <pre class="code"><span class="info file"># File 'lib/csv_decision/result.rb', line 19</span>
806
+ </td>
807
+ <td>
808
+ <pre class="code"><span class="info file"># File 'lib/csv_decision2/result.rb', line 19</span>
751
809
 
752
810
  <span class='kw'>def</span> <span class='id identifier rubyid_outs_functions'>outs_functions</span>
753
811
  <span class='ivar'>@outs_functions</span>
754
812
  <span class='kw'>end</span></pre>
755
- </td>
756
- </tr>
757
- </table>
758
- </div>
759
-
760
- </div>
813
+ </td>
814
+ </tr>
815
+ </table>
816
+ </div>
817
+
818
+ </div>
761
819
 
762
820
 
763
- <div id="instance_method_details" class="method_details_list">
764
- <h2>Instance Method Details</h2>
821
+ <div id="instance_method_details" class="method_details_list">
822
+ <h2>Instance Method Details</h2>
765
823
 
766
-
767
- <div class="method_details first">
768
- <h3 class="signature first" id="accumulate_outs-instance_method">
769
-
770
- #<strong>accumulate_outs</strong>(row) &#x21d2; <tt>void</tt>
771
-
772
824
 
773
-
825
+ <div class="method_details first">
826
+ <h3 class="signature first" id="accumulate_outs-instance_method">
774
827
 
775
-
776
- </h3><div class="docstring">
777
- <div class="discussion">
778
- <p class="note private">
779
- <strong>This method is part of a private API.</strong>
780
- You should avoid using this method if possible, as it may be removed or be changed in the future.
781
- </p>
782
- <p class="note returns_void">This method returns an undefined value.</p>
783
- <p>Accumulate the outs into arrays of values.</p>
828
+ #<strong>accumulate_outs</strong>(row) &#x21d2; <tt>void</tt>
784
829
 
785
830
 
786
- </div>
787
- </div>
788
- <div class="tags">
789
- <p class="tag_title">Parameters:</p>
790
- <ul class="param">
791
-
792
- <li>
793
-
794
- <span class='name'>row</span>
795
-
796
-
797
- <span class='type'>(<tt>Array</tt>)</span>
798
-
799
-
800
-
801
- </li>
802
-
803
- </ul>
804
-
805
-
806
- </div><table class="source_code">
807
- <tr>
808
- <td>
809
- <pre class="lines">
831
+
832
+
833
+
834
+ </h3>
835
+ <div class="docstring">
836
+ <div class="discussion">
837
+ <p class="note private">
838
+ <strong>This method is part of a private API.</strong>
839
+ You should avoid using this method if possible, as it may be removed or be changed in the future.
840
+ </p>
841
+ <p class="note returns_void">This method returns an undefined value.</p>
842
+ <p>Accumulate the outs into arrays of values.</p>
843
+
844
+
845
+ </div>
846
+ </div>
847
+ <div class="tags">
848
+ <p class="tag_title">Parameters:</p>
849
+ <ul class="param">
850
+
851
+ <li>
852
+
853
+ <span class='name'>row</span>
854
+
855
+
856
+ <span class='type'>(<tt>Array</tt>)</span>
857
+
858
+
859
+
860
+ </li>
861
+
862
+ </ul>
863
+
864
+
865
+ </div>
866
+ <table class="source_code">
867
+ <tr>
868
+ <td>
869
+ <pre class="lines">
810
870
 
811
871
 
812
872
  58
813
873
  59
814
874
  60</pre>
815
- </td>
816
- <td>
817
- <pre class="code"><span class="info file"># File 'lib/csv_decision/result.rb', line 58</span>
875
+ </td>
876
+ <td>
877
+ <pre class="code"><span class="info file"># File 'lib/csv_decision2/result.rb', line 58</span>
818
878
 
819
879
  <span class='kw'>def</span> <span class='id identifier rubyid_accumulate_outs'>accumulate_outs</span><span class='lparen'>(</span><span class='id identifier rubyid_row'>row</span><span class='rparen'>)</span>
820
880
  <span class='ivar'>@outs</span><span class='period'>.</span><span class='id identifier rubyid_each_pair'>each_pair</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_col'>col</span><span class='comma'>,</span> <span class='id identifier rubyid_column'>column</span><span class='op'>|</span> <span class='id identifier rubyid_add_cell'>add_cell</span><span class='lparen'>(</span><span class='label'>column_name:</span> <span class='id identifier rubyid_column'>column</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='label'>cell:</span> <span class='id identifier rubyid_row'>row</span><span class='lbracket'>[</span><span class='id identifier rubyid_col'>col</span><span class='rbracket'>]</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
821
881
  <span class='kw'>end</span></pre>
822
- </td>
823
- </tr>
824
- </table>
825
- </div>
826
-
827
- <div class="method_details ">
828
- <h3 class="signature " id="add_outs-instance_method">
829
-
830
- #<strong>add_outs</strong>(row) &#x21d2; <tt>void</tt>
831
-
832
-
833
-
834
-
835
-
836
- </h3><div class="docstring">
837
- <div class="discussion">
838
- <p class="note private">
839
- <strong>This method is part of a private API.</strong>
840
- You should avoid using this method if possible, as it may be removed or be changed in the future.
841
- </p>
842
- <p class="note returns_void">This method returns an undefined value.</p>
843
- <p>Common case for building a single row result is just copying output column
844
- values to the final result hash.</p>
882
+ </td>
883
+ </tr>
884
+ </table>
885
+ </div>
845
886
 
887
+ <div class="method_details ">
888
+ <h3 class="signature " id="add_outs-instance_method">
846
889
 
847
- </div>
848
- </div>
849
- <div class="tags">
850
- <p class="tag_title">Parameters:</p>
851
- <ul class="param">
852
-
853
- <li>
854
-
855
- <span class='name'>row</span>
856
-
857
-
858
- <span class='type'>(<tt>Array</tt>)</span>
859
-
860
-
861
-
862
- </li>
863
-
864
- </ul>
865
-
866
-
867
- </div><table class="source_code">
868
- <tr>
869
- <td>
870
- <pre class="lines">
890
+ #<strong>add_outs</strong>(row) &#x21d2; <tt>void</tt>
891
+
892
+
893
+
894
+
895
+
896
+ </h3>
897
+ <div class="docstring">
898
+ <div class="discussion">
899
+ <p class="note private">
900
+ <strong>This method is part of a private API.</strong>
901
+ You should avoid using this method if possible, as it may be removed or be changed in the future.
902
+ </p>
903
+ <p class="note returns_void">This method returns an undefined value.</p>
904
+ <p>Common case for building a single row result is just copying output column
905
+ values to the final result hash.</p>
906
+
907
+
908
+ </div>
909
+ </div>
910
+ <div class="tags">
911
+ <p class="tag_title">Parameters:</p>
912
+ <ul class="param">
913
+
914
+ <li>
915
+
916
+ <span class='name'>row</span>
917
+
918
+
919
+ <span class='type'>(<tt>Array</tt>)</span>
920
+
921
+
922
+
923
+ </li>
924
+
925
+ </ul>
926
+
927
+
928
+ </div>
929
+ <table class="source_code">
930
+ <tr>
931
+ <td>
932
+ <pre class="lines">
871
933
 
872
934
 
873
935
  51
874
936
  52
875
937
  53</pre>
876
- </td>
877
- <td>
878
- <pre class="code"><span class="info file"># File 'lib/csv_decision/result.rb', line 51</span>
938
+ </td>
939
+ <td>
940
+ <pre class="code"><span class="info file"># File 'lib/csv_decision2/result.rb', line 51</span>
879
941
 
880
942
  <span class='kw'>def</span> <span class='id identifier rubyid_add_outs'>add_outs</span><span class='lparen'>(</span><span class='id identifier rubyid_row'>row</span><span class='rparen'>)</span>
881
943
  <span class='ivar'>@outs</span><span class='period'>.</span><span class='id identifier rubyid_each_pair'>each_pair</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_col'>col</span><span class='comma'>,</span> <span class='id identifier rubyid_column'>column</span><span class='op'>|</span> <span class='ivar'>@attributes</span><span class='lbracket'>[</span><span class='id identifier rubyid_column'>column</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_row'>row</span><span class='lbracket'>[</span><span class='id identifier rubyid_col'>col</span><span class='rbracket'>]</span> <span class='rbrace'>}</span>
882
944
  <span class='kw'>end</span></pre>
883
- </td>
884
- </tr>
885
- </table>
886
- </div>
887
-
888
- <div class="method_details ">
889
- <h3 class="signature " id="eval_cell_proc-instance_method">
890
-
891
- #<strong>eval_cell_proc</strong>(proc:, column_name:, index:) &#x21d2; <tt>Object</tt>
892
-
893
-
894
-
895
-
896
-
897
- </h3><div class="docstring">
898
- <div class="discussion">
899
- <p class="note private">
900
- <strong>This method is part of a private API.</strong>
901
- You should avoid using this method if possible, as it may be removed or be changed in the future.
902
- </p>
903
-
904
- <p>Evaluate the cell proc using the partial result calculated so far.</p>
945
+ </td>
946
+ </tr>
947
+ </table>
948
+ </div>
905
949
 
950
+ <div class="method_details ">
951
+ <h3 class="signature " id="eval_cell_proc-instance_method">
906
952
 
907
- </div>
908
- </div>
909
- <div class="tags">
910
- <p class="tag_title">Parameters:</p>
911
- <ul class="param">
912
-
913
- <li>
914
-
915
- <span class='name'>proc</span>
916
-
917
-
918
- <span class='type'>(<tt>Matchers::Pro</tt>)</span>
919
-
920
-
921
-
922
- </li>
923
-
924
- <li>
925
-
926
- <span class='name'>column_name</span>
927
-
928
-
929
- <span class='type'>(<tt>Symbol</tt>, <tt>Integer</tt>)</span>
930
-
931
-
932
-
933
- </li>
934
-
935
- <li>
936
-
937
- <span class='name'>index</span>
938
-
939
-
940
- <span class='type'>(<tt>Integer</tt>)</span>
941
-
942
-
943
-
944
- </li>
945
-
946
- </ul>
947
-
948
-
949
- </div><table class="source_code">
950
- <tr>
951
- <td>
952
- <pre class="lines">
953
+ #<strong>eval_cell_proc</strong>(proc:, column_name:, index:) &#x21d2; <tt>Object</tt>
954
+
955
+
956
+
957
+
958
+
959
+ </h3>
960
+ <div class="docstring">
961
+ <div class="discussion">
962
+ <p class="note private">
963
+ <strong>This method is part of a private API.</strong>
964
+ You should avoid using this method if possible, as it may be removed or be changed in the future.
965
+ </p>
966
+
967
+ <p>Evaluate the cell proc using the partial result calculated so far.</p>
968
+
969
+
970
+ </div>
971
+ </div>
972
+ <div class="tags">
973
+ <p class="tag_title">Parameters:</p>
974
+ <ul class="param">
975
+
976
+ <li>
977
+
978
+ <span class='name'>proc</span>
979
+
980
+
981
+ <span class='type'>(<tt>Matchers::Pro</tt>)</span>
982
+
983
+
984
+
985
+ </li>
986
+
987
+ <li>
988
+
989
+ <span class='name'>column_name</span>
990
+
991
+
992
+ <span class='type'>(<tt>Symbol</tt>, <tt>Integer</tt>)</span>
993
+
994
+
995
+
996
+ </li>
997
+
998
+ <li>
999
+
1000
+ <span class='name'>index</span>
1001
+
1002
+
1003
+ <span class='type'>(<tt>Integer</tt>)</span>
1004
+
1005
+
1006
+
1007
+ </li>
1008
+
1009
+ </ul>
1010
+
1011
+
1012
+ </div>
1013
+ <table class="source_code">
1014
+ <tr>
1015
+ <td>
1016
+ <pre class="lines">
953
1017
 
954
1018
 
955
1019
  91
956
1020
  92
957
1021
  93</pre>
958
- </td>
959
- <td>
960
- <pre class="code"><span class="info file"># File 'lib/csv_decision/result.rb', line 91</span>
1022
+ </td>
1023
+ <td>
1024
+ <pre class="code"><span class="info file"># File 'lib/csv_decision2/result.rb', line 91</span>
961
1025
 
962
1026
  <span class='kw'>def</span> <span class='id identifier rubyid_eval_cell_proc'>eval_cell_proc</span><span class='lparen'>(</span><span class='label'>proc:</span><span class='comma'>,</span> <span class='label'>column_name:</span><span class='comma'>,</span> <span class='label'>index:</span><span class='rparen'>)</span>
963
1027
  <span class='ivar'>@attributes</span><span class='lbracket'>[</span><span class='id identifier rubyid_column_name'>column_name</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='id identifier rubyid_index'>index</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_proc'>proc</span><span class='period'>.</span><span class='id identifier rubyid_function'>function</span><span class='lbracket'>[</span><span class='id identifier rubyid_partial_result'>partial_result</span><span class='lparen'>(</span><span class='id identifier rubyid_index'>index</span><span class='rparen'>)</span><span class='rbracket'>]</span>
964
1028
  <span class='kw'>end</span></pre>
965
- </td>
966
- </tr>
967
- </table>
968
- </div>
969
-
970
- <div class="method_details ">
971
- <h3 class="signature " id="eval_outs-instance_method">
972
-
973
- #<strong>eval_outs</strong>(row) &#x21d2; <tt>Object</tt>
974
-
975
-
976
-
977
-
978
-
979
- </h3><div class="docstring">
980
- <div class="discussion">
981
- <p class="note private">
982
- <strong>This method is part of a private API.</strong>
983
- You should avoid using this method if possible, as it may be removed or be changed in the future.
984
- </p>
985
-
986
- <p>Evaluate the output columns, and use them to start building the final
987
- result, along with the partial result required to evaluate functions.</p>
1029
+ </td>
1030
+ </tr>
1031
+ </table>
1032
+ </div>
1033
+
1034
+ <div class="method_details ">
1035
+ <h3 class="signature " id="eval_outs-instance_method">
1036
+
1037
+ #<strong>eval_outs</strong>(row) &#x21d2; <tt>Object</tt>
988
1038
 
989
1039
 
990
- </div>
991
- </div>
992
- <div class="tags">
993
- <p class="tag_title">Parameters:</p>
994
- <ul class="param">
995
-
996
- <li>
997
-
998
- <span class='name'>row</span>
999
-
1000
-
1001
- <span class='type'>(<tt>Array</tt>)</span>
1002
-
1003
-
1004
-
1005
- </li>
1006
-
1007
- </ul>
1008
-
1009
-
1010
- </div><table class="source_code">
1011
- <tr>
1012
- <td>
1013
- <pre class="lines">
1040
+
1041
+
1042
+
1043
+ </h3>
1044
+ <div class="docstring">
1045
+ <div class="discussion">
1046
+ <p class="note private">
1047
+ <strong>This method is part of a private API.</strong>
1048
+ You should avoid using this method if possible, as it may be removed or be changed in the future.
1049
+ </p>
1050
+
1051
+ <p>Evaluate the output columns, and use them to start building the final
1052
+ result, along with the partial result required to evaluate functions.</p>
1053
+
1054
+
1055
+ </div>
1056
+ </div>
1057
+ <div class="tags">
1058
+ <p class="tag_title">Parameters:</p>
1059
+ <ul class="param">
1060
+
1061
+ <li>
1062
+
1063
+ <span class='name'>row</span>
1064
+
1065
+
1066
+ <span class='type'>(<tt>Array</tt>)</span>
1067
+
1068
+
1069
+
1070
+ </li>
1071
+
1072
+ </ul>
1073
+
1074
+
1075
+ </div>
1076
+ <table class="source_code">
1077
+ <tr>
1078
+ <td>
1079
+ <pre class="lines">
1014
1080
 
1015
1081
 
1016
1082
  76
@@ -1022,9 +1088,9 @@ result, along with the partial result required to evaluate functions.</p>
1022
1088
  82
1023
1089
  83
1024
1090
  84</pre>
1025
- </td>
1026
- <td>
1027
- <pre class="code"><span class="info file"># File 'lib/csv_decision/result.rb', line 76</span>
1091
+ </td>
1092
+ <td>
1093
+ <pre class="code"><span class="info file"># File 'lib/csv_decision2/result.rb', line 76</span>
1028
1094
 
1029
1095
  <span class='kw'>def</span> <span class='id identifier rubyid_eval_outs'>eval_outs</span><span class='lparen'>(</span><span class='id identifier rubyid_row'>row</span><span class='rparen'>)</span>
1030
1096
  <span class='comment'># Set the constants first, in case the functions refer to them
@@ -1035,52 +1101,54 @@ result, along with the partial result required to evaluate functions.</p>
1035
1101
 
1036
1102
  <span class='id identifier rubyid_final_result'>final_result</span>
1037
1103
  <span class='kw'>end</span></pre>
1038
- </td>
1039
- </tr>
1040
- </table>
1041
- </div>
1042
-
1043
- <div class="method_details ">
1044
- <h3 class="signature " id="final_result-instance_method">
1045
-
1046
- #<strong>final_result</strong> &#x21d2; <tt>Hash{Symbol=&gt;Object}</tt>
1047
-
1048
-
1049
-
1050
-
1051
-
1052
- </h3><div class="docstring">
1053
- <div class="discussion">
1054
- <p class="note private">
1055
- <strong>This method is part of a private API.</strong>
1056
- You should avoid using this method if possible, as it may be removed or be changed in the future.
1057
- </p>
1058
-
1059
- <p>Derive the final result.</p>
1104
+ </td>
1105
+ </tr>
1106
+ </table>
1107
+ </div>
1060
1108
 
1109
+ <div class="method_details ">
1110
+ <h3 class="signature " id="final_result-instance_method">
1111
+
1112
+ #<strong>final_result</strong> &#x21d2; <tt>Hash{Symbol=&gt;Object}</tt>
1113
+
1114
+
1115
+
1116
+
1117
+
1118
+ </h3>
1119
+ <div class="docstring">
1120
+ <div class="discussion">
1121
+ <p class="note private">
1122
+ <strong>This method is part of a private API.</strong>
1123
+ You should avoid using this method if possible, as it may be removed or be changed in the future.
1124
+ </p>
1125
+
1126
+ <p>Derive the final result.</p>
1127
+
1128
+
1129
+ </div>
1130
+ </div>
1131
+ <div class="tags">
1132
+
1133
+ <p class="tag_title">Returns:</p>
1134
+ <ul class="return">
1135
+
1136
+ <li>
1137
+
1138
+
1139
+ <span class='type'>(<tt>Hash{Symbol=&gt;Object}</tt>)</span>
1061
1140
 
1062
- </div>
1063
- </div>
1064
- <div class="tags">
1065
-
1066
- <p class="tag_title">Returns:</p>
1067
- <ul class="return">
1068
-
1069
- <li>
1070
-
1071
-
1072
- <span class='type'>(<tt>Hash{Symbol=&gt;Object}</tt>)</span>
1073
-
1074
-
1075
-
1076
- </li>
1077
-
1078
- </ul>
1079
-
1080
- </div><table class="source_code">
1081
- <tr>
1082
- <td>
1083
- <pre class="lines">
1141
+
1142
+
1143
+ </li>
1144
+
1145
+ </ul>
1146
+
1147
+ </div>
1148
+ <table class="source_code">
1149
+ <tr>
1150
+ <td>
1151
+ <pre class="lines">
1084
1152
 
1085
1153
 
1086
1154
  64
@@ -1089,9 +1157,9 @@ result, along with the partial result required to evaluate functions.</p>
1089
1157
  67
1090
1158
  68
1091
1159
  69</pre>
1092
- </td>
1093
- <td>
1094
- <pre class="code"><span class="info file"># File 'lib/csv_decision/result.rb', line 64</span>
1160
+ </td>
1161
+ <td>
1162
+ <pre class="code"><span class="info file"># File 'lib/csv_decision2/result.rb', line 64</span>
1095
1163
 
1096
1164
  <span class='kw'>def</span> <span class='id identifier rubyid_final_result'>final_result</span>
1097
1165
  <span class='comment'># If there are no if: columns, then nothing needs to be filtered out of this result hash.
@@ -1099,59 +1167,61 @@ result, along with the partial result required to evaluate functions.</p>
1099
1167
 
1100
1168
  <span class='ivar'>@multi_result</span> <span class='op'>?</span> <span class='id identifier rubyid_multi_row_result'>multi_row_result</span> <span class='op'>:</span> <span class='id identifier rubyid_single_row_result'>single_row_result</span>
1101
1169
  <span class='kw'>end</span></pre>
1102
- </td>
1103
- </tr>
1104
- </table>
1105
- </div>
1106
-
1107
- <div class="method_details ">
1108
- <h3 class="signature " id="input-instance_method">
1109
-
1110
- #<strong>input</strong>(data) &#x21d2; <tt>void</tt>
1111
-
1112
-
1113
-
1114
-
1115
-
1116
- </h3><div class="docstring">
1117
- <div class="discussion">
1118
- <p class="note private">
1119
- <strong>This method is part of a private API.</strong>
1120
- You should avoid using this method if possible, as it may be removed or be changed in the future.
1121
- </p>
1122
- <p class="note returns_void">This method returns an undefined value.</p>
1123
- <p>Initialize the object for new input data.</p>
1170
+ </td>
1171
+ </tr>
1172
+ </table>
1173
+ </div>
1124
1174
 
1175
+ <div class="method_details ">
1176
+ <h3 class="signature " id="input-instance_method">
1177
+
1178
+ #<strong>input</strong>(data) &#x21d2; <tt>void</tt>
1179
+
1180
+
1181
+
1182
+
1183
+
1184
+ </h3>
1185
+ <div class="docstring">
1186
+ <div class="discussion">
1187
+ <p class="note private">
1188
+ <strong>This method is part of a private API.</strong>
1189
+ You should avoid using this method if possible, as it may be removed or be changed in the future.
1190
+ </p>
1191
+ <p class="note returns_void">This method returns an undefined value.</p>
1192
+ <p>Initialize the object for new input data.</p>
1193
+
1194
+
1195
+ </div>
1196
+ </div>
1197
+ <div class="tags">
1198
+ <p class="tag_title">Parameters:</p>
1199
+ <ul class="param">
1200
+
1201
+ <li>
1202
+
1203
+ <span class='name'>data</span>
1125
1204
 
1126
- </div>
1127
- </div>
1128
- <div class="tags">
1129
- <p class="tag_title">Parameters:</p>
1130
- <ul class="param">
1131
-
1132
- <li>
1133
-
1134
- <span class='name'>data</span>
1135
-
1136
-
1137
- <span class='type'>(<tt>Hash{Symbol=&gt;Object}</tt>)</span>
1138
-
1139
-
1140
-
1141
- &mdash;
1142
- <div class='inline'>
1143
- <p>Input data hash.</p>
1144
- </div>
1145
-
1146
- </li>
1147
-
1148
- </ul>
1149
-
1150
-
1151
- </div><table class="source_code">
1152
- <tr>
1153
- <td>
1154
- <pre class="lines">
1205
+
1206
+ <span class='type'>(<tt>Hash{Symbol=&gt;Object}</tt>)</span>
1207
+
1208
+
1209
+
1210
+ &mdash;
1211
+ <div class='inline'>
1212
+ <p>Input data hash.</p>
1213
+ </div>
1214
+
1215
+ </li>
1216
+
1217
+ </ul>
1218
+
1219
+
1220
+ </div>
1221
+ <table class="source_code">
1222
+ <tr>
1223
+ <td>
1224
+ <pre class="lines">
1155
1225
 
1156
1226
 
1157
1227
  35
@@ -1165,9 +1235,9 @@ result, along with the partial result required to evaluate functions.</p>
1165
1235
  43
1166
1236
  44
1167
1237
  45</pre>
1168
- </td>
1169
- <td>
1170
- <pre class="code"><span class="info file"># File 'lib/csv_decision/result.rb', line 35</span>
1238
+ </td>
1239
+ <td>
1240
+ <pre class="code"><span class="info file"># File 'lib/csv_decision2/result.rb', line 35</span>
1171
1241
 
1172
1242
  <span class='kw'>def</span> <span class='id identifier rubyid_input'>input</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='rparen'>)</span>
1173
1243
  <span class='comment'># Attributes hash contains the output decision key value pairs
@@ -1180,21 +1250,22 @@ result, along with the partial result required to evaluate functions.</p>
1180
1250
  </span> <span class='comment'># are accumulated.
1181
1251
  </span> <span class='ivar'>@partial_result</span> <span class='op'>=</span> <span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_slice'>slice</span><span class='lparen'>(</span><span class='op'>*</span><span class='ivar'>@table</span><span class='period'>.</span><span class='id identifier rubyid_columns'>columns</span><span class='period'>.</span><span class='id identifier rubyid_input_keys'>input_keys</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='ivar'>@outs_functions</span>
1182
1252
  <span class='kw'>end</span></pre>
1183
- </td>
1184
- </tr>
1185
- </table>
1186
- </div>
1187
-
1188
- </div>
1253
+ </td>
1254
+ </tr>
1255
+ </table>
1256
+ </div>
1189
1257
 
1190
- </div>
1258
+ </div>
1191
1259
 
1192
- <div id="footer">
1193
- Generated on Sun Feb 11 10:26:08 2018 by
1194
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1195
- 0.9.12 (ruby-2.4.0).
1196
- </div>
1260
+ </div>
1197
1261
 
1262
+ <div id="footer">
1263
+ Generated on Sun Feb 11 10:26:08 2018 by
1264
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1265
+ 0.9.12 (ruby-2.4.0).
1198
1266
  </div>
1199
- </body>
1200
- </html>
1267
+
1268
+ </div>
1269
+ </body>
1270
+
1271
+ </html>