csv_decision2 0.5.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
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::Decision
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::Decision
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::Decision";
19
- relpath = '../';
20
- </script>
18
+ <script type="text/javascript" charset="utf-8">
19
+ pathId = "CSVDecision2::Decision";
20
+ relpath = '../';
21
+ </script>
21
22
 
22
23
 
23
24
  <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
@@ -25,353 +26,383 @@
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 (D)</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">Decision</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 (D)</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">Decision</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::Decision
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::Decision</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/decision.rb</dd>
101
+ </dl>
102
+
60
103
  </div>
61
104
 
62
- <div id="content"><h1>Class: CSVDecision::Decision
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::Decision</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/decision.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) and calculate the final result.</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) and calculate the final result.</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="#first_match-instance_method" title="#first_match (instance method)">#<strong>first_match</strong> &#x21d2; Boolean </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>True if a first match decision table.</p>
148
- </div></span>
149
-
150
- </li>
151
-
152
-
153
- </ul>
154
-
155
-
156
-
157
-
158
-
159
- <h2>
160
- Class Method Summary
161
- <small><a href="#" class="summary_toggle">collapse</a></small>
162
- </h2>
163
-
164
- <ul class="summary">
165
-
166
128
  <li class="public ">
167
- <span class="summary_signature">
168
-
169
- <a href="#make-class_method" title="make (class method)">.<strong>make</strong>(table:, input:, symbolize_keys:) &#x21d2; Hash{Symbol=&gt;Object} </a>
170
-
171
-
172
-
173
- </span>
174
-
175
-
176
-
177
-
178
-
179
-
180
- <span class="private note title">private</span>
181
-
182
-
183
- <span class="summary_desc"><div class='inline'>
184
- <p>Main method for making decisions without a path.</p>
185
- </div></span>
186
-
187
- </li>
188
-
189
-
190
- </ul>
191
-
192
- <h2>
193
- Instance Method Summary
194
- <small><a href="#" class="summary_toggle">collapse</a></small>
195
- </h2>
196
-
197
- <ul class="summary">
198
-
129
+ <span class="summary_signature">
130
+
131
+ <a href="#first_match-instance_method" title="#first_match (instance method)">#<strong>first_match</strong>
132
+ &#x21d2; Boolean </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>True if a first match decision table.</p>
154
+ </div>
155
+ </span>
156
+
157
+ </li>
158
+
159
+
160
+ </ul>
161
+
162
+
163
+
164
+
165
+
166
+ <h2>
167
+ Class Method Summary
168
+ <small><a href="#" class="summary_toggle">collapse</a></small>
169
+ </h2>
170
+
171
+ <ul class="summary">
172
+
199
173
  <li class="public ">
200
- <span class="summary_signature">
201
-
202
- <a href="#index_scan_accumulate-instance_method" title="#index_scan_accumulate (instance method)">#<strong>index_scan_accumulate</strong>(scan_cols:, hash:, index_rows:) &#x21d2; Hash{Symbol=&gt;Object} </a>
203
-
204
-
205
-
206
- </span>
207
-
208
-
209
-
210
-
211
-
212
-
213
- <span class="private note title">private</span>
214
-
215
-
216
- <span class="summary_desc"><div class='inline'>
217
- <p>Scan the index for an accumulated result.</p>
218
- </div></span>
219
-
220
- </li>
221
-
222
-
174
+ <span class="summary_signature">
175
+
176
+ <a href="#make-class_method" title="make (class method)">.<strong>make</strong>(table:, input:,
177
+ symbolize_keys:) &#x21d2; Hash{Symbol=&gt;Object} </a>
178
+
179
+
180
+
181
+ </span>
182
+
183
+
184
+
185
+
186
+
187
+
188
+ <span class="private note title">private</span>
189
+
190
+
191
+ <span class="summary_desc">
192
+ <div class='inline'>
193
+ <p>Main method for making decisions without a path.</p>
194
+ </div>
195
+ </span>
196
+
197
+ </li>
198
+
199
+
200
+ </ul>
201
+
202
+ <h2>
203
+ Instance Method Summary
204
+ <small><a href="#" class="summary_toggle">collapse</a></small>
205
+ </h2>
206
+
207
+ <ul class="summary">
208
+
223
209
  <li class="public ">
224
- <span class="summary_signature">
225
-
226
- <a href="#index_scan_first_match-instance_method" title="#index_scan_first_match (instance method)">#<strong>index_scan_first_match</strong>(scan_cols:, hash:, index_rows:) &#x21d2; Hash{Symbol=&gt;Object} </a>
227
-
228
-
229
-
230
- </span>
231
-
232
-
233
-
234
-
235
-
236
-
237
- <span class="private note title">private</span>
238
-
239
-
240
- <span class="summary_desc"><div class='inline'>
241
- <p>Scan the index for a first match result.</p>
242
- </div></span>
243
-
244
- </li>
245
-
246
-
210
+ <span class="summary_signature">
211
+
212
+ <a href="#index_scan_accumulate-instance_method"
213
+ title="#index_scan_accumulate (instance method)">#<strong>index_scan_accumulate</strong>(scan_cols:,
214
+ hash:, index_rows:) &#x21d2; Hash{Symbol=&gt;Object} </a>
215
+
216
+
217
+
218
+ </span>
219
+
220
+
221
+
222
+
223
+
224
+
225
+ <span class="private note title">private</span>
226
+
227
+
228
+ <span class="summary_desc">
229
+ <div class='inline'>
230
+ <p>Scan the index for an accumulated result.</p>
231
+ </div>
232
+ </span>
233
+
234
+ </li>
235
+
236
+
247
237
  <li class="public ">
248
- <span class="summary_signature">
249
-
250
- <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(table:) &#x21d2; Decision </a>
251
-
252
-
253
-
254
- </span>
255
-
256
-
257
- <span class="note title constructor">constructor</span>
258
-
259
-
260
-
261
-
262
-
263
- <span class="private note title">private</span>
264
-
265
-
266
- <span class="summary_desc"><div class='inline'>
267
- <p>A new instance of Decision.</p>
268
- </div></span>
269
-
270
- </li>
271
-
272
-
238
+ <span class="summary_signature">
239
+
240
+ <a href="#index_scan_first_match-instance_method"
241
+ title="#index_scan_first_match (instance method)">#<strong>index_scan_first_match</strong>(scan_cols:,
242
+ hash:, index_rows:) &#x21d2; Hash{Symbol=&gt;Object} </a>
243
+
244
+
245
+
246
+ </span>
247
+
248
+
249
+
250
+
251
+
252
+
253
+ <span class="private note title">private</span>
254
+
255
+
256
+ <span class="summary_desc">
257
+ <div class='inline'>
258
+ <p>Scan the index for a first match result.</p>
259
+ </div>
260
+ </span>
261
+
262
+ </li>
263
+
264
+
273
265
  <li class="public ">
274
- <span class="summary_signature">
275
-
276
- <a href="#input-instance_method" title="#input (instance method)">#<strong>input</strong>(data) &#x21d2; void </a>
277
-
278
-
279
-
280
- </span>
281
-
282
-
283
-
284
-
285
-
286
-
287
- <span class="private note title">private</span>
288
-
289
-
290
- <span class="summary_desc"><div class='inline'>
291
- <p>Initialize the input data used to make the decision.</p>
292
- </div></span>
293
-
294
- </li>
295
-
296
-
266
+ <span class="summary_signature">
267
+
268
+ <a href="#initialize-instance_method"
269
+ title="#initialize (instance method)">#<strong>initialize</strong>(table:) &#x21d2; Decision </a>
270
+
271
+
272
+
273
+ </span>
274
+
275
+
276
+ <span class="note title constructor">constructor</span>
277
+
278
+
279
+
280
+
281
+
282
+ <span class="private note title">private</span>
283
+
284
+
285
+ <span class="summary_desc">
286
+ <div class='inline'>
287
+ <p>A new instance of Decision.</p>
288
+ </div>
289
+ </span>
290
+
291
+ </li>
292
+
293
+
297
294
  <li class="public ">
298
- <span class="summary_signature">
299
-
300
- <a href="#scan-instance_method" title="#scan (instance method)">#<strong>scan</strong>(data) &#x21d2; Hash{Symbol=&gt;Object} </a>
301
-
302
-
303
-
304
- </span>
305
-
306
-
307
-
308
-
309
-
310
-
311
- <span class="private note title">private</span>
312
-
313
-
314
- <span class="summary_desc"><div class='inline'>
315
- <p>Scan the decision table and produce an output decision.</p>
316
- </div></span>
317
-
318
- </li>
319
-
320
-
321
- </ul>
322
-
323
-
324
- <div id="constructor_details" class="method_details_list">
325
- <h2>Constructor Details</h2>
326
-
327
- <div class="method_details first">
328
- <h3 class="signature first" id="initialize-instance_method">
329
-
330
- #<strong>initialize</strong>(table:) &#x21d2; <tt><span class='object_link'><a href="" title="CSVDecision::Decision (class)">Decision</a></span></tt>
331
-
332
-
333
-
334
-
335
-
336
- </h3><div class="docstring">
337
- <div class="discussion">
338
- <p class="note private">
339
- <strong>This method is part of a private API.</strong>
340
- You should avoid using this method if possible, as it may be removed or be changed in the future.
341
- </p>
342
-
343
- <p>Returns a new instance of Decision</p>
295
+ <span class="summary_signature">
344
296
 
297
+ <a href="#input-instance_method" title="#input (instance method)">#<strong>input</strong>(data) &#x21d2;
298
+ void </a>
345
299
 
346
- </div>
347
- </div>
348
- <div class="tags">
349
- <p class="tag_title">Parameters:</p>
350
- <ul class="param">
351
-
352
- <li>
353
-
354
- <span class='name'>table</span>
355
-
356
-
357
- <span class='type'>(<tt><span class='object_link'><a href="Table.html" title="CSVDecision::Table (class)">CSVDecision::Table</a></span></tt>)</span>
358
-
359
-
360
-
361
- &mdash;
362
- <div class='inline'>
363
- <p>Decision table being processed.</p>
364
- </div>
365
-
366
- </li>
367
-
368
- </ul>
369
-
370
-
371
- </div><table class="source_code">
372
- <tr>
373
- <td>
374
- <pre class="lines">
300
+
301
+
302
+ </span>
303
+
304
+
305
+
306
+
307
+
308
+
309
+ <span class="private note title">private</span>
310
+
311
+
312
+ <span class="summary_desc">
313
+ <div class='inline'>
314
+ <p>Initialize the input data used to make the decision.</p>
315
+ </div>
316
+ </span>
317
+
318
+ </li>
319
+
320
+
321
+ <li class="public ">
322
+ <span class="summary_signature">
323
+
324
+ <a href="#scan-instance_method" title="#scan (instance method)">#<strong>scan</strong>(data) &#x21d2;
325
+ Hash{Symbol=&gt;Object} </a>
326
+
327
+
328
+
329
+ </span>
330
+
331
+
332
+
333
+
334
+
335
+
336
+ <span class="private note title">private</span>
337
+
338
+
339
+ <span class="summary_desc">
340
+ <div class='inline'>
341
+ <p>Scan the decision table and produce an output decision.</p>
342
+ </div>
343
+ </span>
344
+
345
+ </li>
346
+
347
+
348
+ </ul>
349
+
350
+
351
+ <div id="constructor_details" class="method_details_list">
352
+ <h2>Constructor Details</h2>
353
+
354
+ <div class="method_details first">
355
+ <h3 class="signature first" id="initialize-instance_method">
356
+
357
+ #<strong>initialize</strong>(table:) &#x21d2; <tt><span class='object_link'><a href=""
358
+ title="CSVDecision2::Decision (class)">Decision</a></span></tt>
359
+
360
+
361
+
362
+
363
+
364
+ </h3>
365
+ <div class="docstring">
366
+ <div class="discussion">
367
+ <p class="note private">
368
+ <strong>This method is part of a private API.</strong>
369
+ You should avoid using this method if possible, as it may be removed or be changed in the future.
370
+ </p>
371
+
372
+ <p>Returns a new instance of Decision</p>
373
+
374
+
375
+ </div>
376
+ </div>
377
+ <div class="tags">
378
+ <p class="tag_title">Parameters:</p>
379
+ <ul class="param">
380
+
381
+ <li>
382
+
383
+ <span class='name'>table</span>
384
+
385
+
386
+ <span class='type'>(<tt><span class='object_link'><a href="Table.html"
387
+ title="CSVDecision2::Table (class)">CSVDecision2::Table</a></span></tt>)</span>
388
+
389
+
390
+
391
+ &mdash;
392
+ <div class='inline'>
393
+ <p>Decision table being processed.</p>
394
+ </div>
395
+
396
+ </li>
397
+
398
+ </ul>
399
+
400
+
401
+ </div>
402
+ <table class="source_code">
403
+ <tr>
404
+ <td>
405
+ <pre class="lines">
375
406
 
376
407
 
377
408
  31
@@ -381,198 +412,203 @@
381
412
  35
382
413
  36
383
414
  37</pre>
384
- </td>
385
- <td>
386
- <pre class="code"><span class="info file"># File 'lib/csv_decision/decision.rb', line 31</span>
415
+ </td>
416
+ <td>
417
+ <pre class="code"><span class="info file"># File 'lib/csv_decision2/decision.rb', line 31</span>
387
418
 
388
419
  <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>
389
420
  <span class='comment'># The result object is a hash of values, and each value will be an array if this is
390
421
  </span> <span class='comment'># a multi-row result for the +first_match: false+ option.
391
- </span> <span class='ivar'>@result</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="Result.html" title="CSVDecision::Result (class)">Result</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Result.html#initialize-instance_method" title="CSVDecision::Result#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='label'>table:</span> <span class='id identifier rubyid_table'>table</span><span class='rparen'>)</span>
422
+ </span> <span class='ivar'>@result</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="Result.html" title="CSVDecision2::Result (class)">Result</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Result.html#initialize-instance_method" title="CSVDecision2::Result#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='label'>table:</span> <span class='id identifier rubyid_table'>table</span><span class='rparen'>)</span>
392
423
  <span class='ivar'>@first_match</span> <span class='op'>=</span> <span class='id identifier rubyid_table'>table</span><span class='period'>.</span><span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:first_match</span><span class='rbracket'>]</span>
393
424
  <span class='ivar'>@table</span> <span class='op'>=</span> <span class='id identifier rubyid_table'>table</span>
394
425
  <span class='kw'>end</span></pre>
395
- </td>
396
- </tr>
397
- </table>
398
- </div>
399
-
400
- </div>
401
-
402
- <div id="instance_attr_details" class="attr_details">
403
- <h2>Instance Attribute Details</h2>
404
-
405
-
406
- <span id=""></span>
407
- <div class="method_details first">
408
- <h3 class="signature first" id="first_match-instance_method">
409
-
410
- #<strong>first_match</strong> &#x21d2; <tt>Boolean</tt> <span class="extras">(readonly)</span>
411
-
412
-
413
-
414
-
415
-
416
- </h3><div class="docstring">
417
- <div class="discussion">
418
- <p class="note private">
419
- <strong>This method is part of a private API.</strong>
420
- You should avoid using this method if possible, as it may be removed or be changed in the future.
421
- </p>
422
-
423
- <p>Returns True if a first match decision table.</p>
426
+ </td>
427
+ </tr>
428
+ </table>
429
+ </div>
430
+
431
+ </div>
432
+
433
+ <div id="instance_attr_details" class="attr_details">
434
+ <h2>Instance Attribute Details</h2>
435
+
436
+
437
+ <span id=""></span>
438
+ <div class="method_details first">
439
+ <h3 class="signature first" id="first_match-instance_method">
440
+
441
+ #<strong>first_match</strong> &#x21d2; <tt>Boolean</tt> <span class="extras">(readonly)</span>
424
442
 
425
443
 
426
- </div>
427
- </div>
428
- <div class="tags">
429
-
430
- <p class="tag_title">Returns:</p>
431
- <ul class="return">
432
-
433
- <li>
434
-
435
-
436
- <span class='type'>(<tt>Boolean</tt>)</span>
437
-
438
-
439
-
440
- &mdash;
441
- <div class='inline'>
442
- <p>True if a first match decision table.</p>
443
- </div>
444
-
445
- </li>
446
-
447
- </ul>
448
-
449
- </div><table class="source_code">
450
- <tr>
451
- <td>
452
- <pre class="lines">
444
+
445
+
446
+
447
+ </h3>
448
+ <div class="docstring">
449
+ <div class="discussion">
450
+ <p class="note private">
451
+ <strong>This method is part of a private API.</strong>
452
+ You should avoid using this method if possible, as it may be removed or be changed in the future.
453
+ </p>
454
+
455
+ <p>Returns True if a first match decision table.</p>
456
+
457
+
458
+ </div>
459
+ </div>
460
+ <div class="tags">
461
+
462
+ <p class="tag_title">Returns:</p>
463
+ <ul class="return">
464
+
465
+ <li>
466
+
467
+
468
+ <span class='type'>(<tt>Boolean</tt>)</span>
469
+
470
+
471
+
472
+ &mdash;
473
+ <div class='inline'>
474
+ <p>True if a first match decision table.</p>
475
+ </div>
476
+
477
+ </li>
478
+
479
+ </ul>
480
+
481
+ </div>
482
+ <table class="source_code">
483
+ <tr>
484
+ <td>
485
+ <pre class="lines">
453
486
 
454
487
 
455
488
  28
456
489
  29
457
490
  30</pre>
458
- </td>
459
- <td>
460
- <pre class="code"><span class="info file"># File 'lib/csv_decision/decision.rb', line 28</span>
491
+ </td>
492
+ <td>
493
+ <pre class="code"><span class="info file"># File 'lib/csv_decision2/decision.rb', line 28</span>
461
494
 
462
495
  <span class='kw'>def</span> <span class='id identifier rubyid_first_match'>first_match</span>
463
496
  <span class='ivar'>@first_match</span>
464
497
  <span class='kw'>end</span></pre>
465
- </td>
466
- </tr>
467
- </table>
468
- </div>
469
-
470
- </div>
498
+ </td>
499
+ </tr>
500
+ </table>
501
+ </div>
471
502
 
503
+ </div>
472
504
 
473
- <div id="class_method_details" class="method_details_list">
474
- <h2>Class Method Details</h2>
475
505
 
476
-
477
- <div class="method_details first">
478
- <h3 class="signature first" id="make-class_method">
479
-
480
- .<strong>make</strong>(table:, input:, symbolize_keys:) &#x21d2; <tt>Hash{Symbol=&gt;Object}</tt>
481
-
506
+ <div id="class_method_details" class="method_details_list">
507
+ <h2>Class Method Details</h2>
482
508
 
483
-
484
509
 
485
-
486
- </h3><div class="docstring">
487
- <div class="discussion">
488
- <p class="note private">
489
- <strong>This method is part of a private API.</strong>
490
- You should avoid using this method if possible, as it may be removed or be changed in the future.
491
- </p>
510
+ <div class="method_details first">
511
+ <h3 class="signature first" id="make-class_method">
492
512
 
493
- <p>Main method for making decisions without a path.</p>
513
+ .<strong>make</strong>(table:, input:, symbolize_keys:) &#x21d2; <tt>Hash{Symbol=&gt;Object}</tt>
494
514
 
495
515
 
496
- </div>
497
- </div>
498
- <div class="tags">
499
- <p class="tag_title">Parameters:</p>
500
- <ul class="param">
501
-
502
- <li>
503
-
504
- <span class='name'>table</span>
505
-
506
-
507
- <span class='type'>(<tt><span class='object_link'><a href="Table.html" title="CSVDecision::Table (class)">CSVDecision::Table</a></span></tt>)</span>
508
-
509
-
510
-
511
- &mdash;
512
- <div class='inline'>
513
- <p>Decision table.</p>
514
- </div>
515
-
516
- </li>
517
-
518
- <li>
519
-
520
- <span class='name'>input</span>
521
-
522
-
523
- <span class='type'>(<tt>Hash</tt>)</span>
524
-
525
-
526
-
527
- &mdash;
528
- <div class='inline'>
529
- <p>Input hash (keys may or may not be symbolized)</p>
530
- </div>
531
-
532
- </li>
533
-
534
- <li>
535
-
536
- <span class='name'>symbolize_keys</span>
537
-
538
-
539
- <span class='type'>(<tt>Boolean</tt>)</span>
540
-
541
-
542
-
543
- &mdash;
544
- <div class='inline'>
545
- <p>Set to false if keys are symbolized and it&#39;s OK to mutate the input
546
- hash. Otherwise a copy of the input hash is symbolized.</p>
547
- </div>
548
-
549
- </li>
550
-
551
- </ul>
552
-
553
- <p class="tag_title">Returns:</p>
554
- <ul class="return">
555
-
556
- <li>
557
-
558
-
559
- <span class='type'>(<tt>Hash{Symbol=&gt;Object}</tt>)</span>
560
-
561
-
562
-
563
- &mdash;
564
- <div class='inline'>
565
- <p>Decision result.</p>
566
- </div>
567
-
568
- </li>
569
-
570
- </ul>
571
-
572
- </div><table class="source_code">
573
- <tr>
574
- <td>
575
- <pre class="lines">
516
+
517
+
518
+
519
+ </h3>
520
+ <div class="docstring">
521
+ <div class="discussion">
522
+ <p class="note private">
523
+ <strong>This method is part of a private API.</strong>
524
+ You should avoid using this method if possible, as it may be removed or be changed in the future.
525
+ </p>
526
+
527
+ <p>Main method for making decisions without a path.</p>
528
+
529
+
530
+ </div>
531
+ </div>
532
+ <div class="tags">
533
+ <p class="tag_title">Parameters:</p>
534
+ <ul class="param">
535
+
536
+ <li>
537
+
538
+ <span class='name'>table</span>
539
+
540
+
541
+ <span class='type'>(<tt><span class='object_link'><a href="Table.html"
542
+ title="CSVDecision2::Table (class)">CSVDecision2::Table</a></span></tt>)</span>
543
+
544
+
545
+
546
+ &mdash;
547
+ <div class='inline'>
548
+ <p>Decision table.</p>
549
+ </div>
550
+
551
+ </li>
552
+
553
+ <li>
554
+
555
+ <span class='name'>input</span>
556
+
557
+
558
+ <span class='type'>(<tt>Hash</tt>)</span>
559
+
560
+
561
+
562
+ &mdash;
563
+ <div class='inline'>
564
+ <p>Input hash (keys may or may not be symbolized)</p>
565
+ </div>
566
+
567
+ </li>
568
+
569
+ <li>
570
+
571
+ <span class='name'>symbolize_keys</span>
572
+
573
+
574
+ <span class='type'>(<tt>Boolean</tt>)</span>
575
+
576
+
577
+
578
+ &mdash;
579
+ <div class='inline'>
580
+ <p>Set to false if keys are symbolized and it&#39;s OK to mutate the input
581
+ hash. Otherwise a copy of the input hash is symbolized.</p>
582
+ </div>
583
+
584
+ </li>
585
+
586
+ </ul>
587
+
588
+ <p class="tag_title">Returns:</p>
589
+ <ul class="return">
590
+
591
+ <li>
592
+
593
+
594
+ <span class='type'>(<tt>Hash{Symbol=&gt;Object}</tt>)</span>
595
+
596
+
597
+
598
+ &mdash;
599
+ <div class='inline'>
600
+ <p>Decision result.</p>
601
+ </div>
602
+
603
+ </li>
604
+
605
+ </ul>
606
+
607
+ </div>
608
+ <table class="source_code">
609
+ <tr>
610
+ <td>
611
+ <pre class="lines">
576
612
 
577
613
 
578
614
  18
@@ -583,107 +619,110 @@ hash. Otherwise a copy of the input hash is symbolized.</p>
583
619
  23
584
620
  24
585
621
  25</pre>
586
- </td>
587
- <td>
588
- <pre class="code"><span class="info file"># File 'lib/csv_decision/decision.rb', line 18</span>
622
+ </td>
623
+ <td>
624
+ <pre class="code"><span class="info file"># File 'lib/csv_decision2/decision.rb', line 18</span>
589
625
 
590
626
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_make'>make</span><span class='lparen'>(</span><span class='label'>table:</span><span class='comma'>,</span> <span class='label'>input:</span><span class='comma'>,</span> <span class='label'>symbolize_keys:</span><span class='rparen'>)</span>
591
627
  <span class='comment'># Parse and transform the hash supplied as input
592
- </span> <span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="Input.html" title="CSVDecision::Input (module)">Input</a></span></span><span class='period'>.</span><span class='id identifier rubyid_parse'><span class='object_link'><a href="Input.html#parse-class_method" title="CSVDecision::Input.parse (method)">parse</a></span></span><span class='lparen'>(</span><span class='label'>table:</span> <span class='id identifier rubyid_table'>table</span><span class='comma'>,</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='id identifier rubyid_symbolize_keys'>symbolize_keys</span><span class='rparen'>)</span>
628
+ </span> <span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="Input.html" title="CSVDecision2::Input (module)">Input</a></span></span><span class='period'>.</span><span class='id identifier rubyid_parse'><span class='object_link'><a href="Input.html#parse-class_method" title="CSVDecision2::Input.parse (method)">parse</a></span></span><span class='lparen'>(</span><span class='label'>table:</span> <span class='id identifier rubyid_table'>table</span><span class='comma'>,</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='id identifier rubyid_symbolize_keys'>symbolize_keys</span><span class='rparen'>)</span>
593
629
 
594
630
  <span class='comment'># The decision object collects the results of the search and
595
631
  </span> <span class='comment'># calculates the final result.
596
- </span> <span class='const'><span class='object_link'><a href="" title="CSVDecision::Decision (class)">Decision</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="CSVDecision::Decision#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='label'>table:</span> <span class='id identifier rubyid_table'>table</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_scan'><span class='object_link'><a href="#scan-instance_method" title="CSVDecision::Decision#scan (method)">scan</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='rparen'>)</span>
632
+ </span> <span class='const'><span class='object_link'><a href="" title="CSVDecision2::Decision (class)">Decision</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="CSVDecision2::Decision#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='label'>table:</span> <span class='id identifier rubyid_table'>table</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_scan'><span class='object_link'><a href="#scan-instance_method" title="CSVDecision2::Decision#scan (method)">scan</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='rparen'>)</span>
597
633
  <span class='kw'>end</span></pre>
598
- </td>
599
- </tr>
600
- </table>
601
- </div>
602
-
603
- </div>
634
+ </td>
635
+ </tr>
636
+ </table>
637
+ </div>
604
638
 
605
- <div id="instance_method_details" class="method_details_list">
606
- <h2>Instance Method Details</h2>
639
+ </div>
607
640
 
608
-
609
- <div class="method_details first">
610
- <h3 class="signature first" id="index_scan_accumulate-instance_method">
611
-
612
- #<strong>index_scan_accumulate</strong>(scan_cols:, hash:, index_rows:) &#x21d2; <tt>Hash{Symbol=&gt;Object}</tt>
613
-
641
+ <div id="instance_method_details" class="method_details_list">
642
+ <h2>Instance Method Details</h2>
614
643
 
615
-
616
644
 
617
-
618
- </h3><div class="docstring">
619
- <div class="discussion">
620
- <p class="note private">
621
- <strong>This method is part of a private API.</strong>
622
- You should avoid using this method if possible, as it may be removed or be changed in the future.
623
- </p>
645
+ <div class="method_details first">
646
+ <h3 class="signature first" id="index_scan_accumulate-instance_method">
624
647
 
625
- <p>Scan the index for an accumulated result.</p>
648
+ #<strong>index_scan_accumulate</strong>(scan_cols:, hash:, index_rows:) &#x21d2;
649
+ <tt>Hash{Symbol=&gt;Object}</tt>
650
+
651
+
652
+
653
+
654
+
655
+ </h3>
656
+ <div class="docstring">
657
+ <div class="discussion">
658
+ <p class="note private">
659
+ <strong>This method is part of a private API.</strong>
660
+ You should avoid using this method if possible, as it may be removed or be changed in the future.
661
+ </p>
662
+
663
+ <p>Scan the index for an accumulated result.</p>
664
+
665
+
666
+ </div>
667
+ </div>
668
+ <div class="tags">
669
+ <p class="tag_title">Parameters:</p>
670
+ <ul class="param">
671
+
672
+ <li>
673
+
674
+ <span class='name'>scan_cols</span>
675
+
676
+
677
+ <span class='type'>(<tt>Hash{Integer=&gt;Object}</tt>)</span>
678
+
679
+
680
+
681
+ </li>
682
+
683
+ <li>
684
+
685
+ <span class='name'>hash</span>
686
+
687
+
688
+ <span class='type'>(<tt>Hash{Symbol=&gt;Object}</tt>)</span>
689
+
690
+
691
+
692
+ </li>
693
+
694
+ <li>
695
+
696
+ <span class='name'>index_rows</span>
697
+
698
+
699
+ <span class='type'>(<tt>Array&lt;Integer&gt;</tt>)</span>
700
+
701
+
702
+
703
+ </li>
704
+
705
+ </ul>
706
+
707
+ <p class="tag_title">Returns:</p>
708
+ <ul class="return">
709
+
710
+ <li>
711
+
712
+
713
+ <span class='type'>(<tt>Hash{Symbol=&gt;Object}</tt>)</span>
626
714
 
627
715
 
628
- </div>
629
- </div>
630
- <div class="tags">
631
- <p class="tag_title">Parameters:</p>
632
- <ul class="param">
633
-
634
- <li>
635
-
636
- <span class='name'>scan_cols</span>
637
-
638
-
639
- <span class='type'>(<tt>Hash{Integer=&gt;Object}</tt>)</span>
640
-
641
-
642
-
643
- </li>
644
-
645
- <li>
646
-
647
- <span class='name'>hash</span>
648
-
649
-
650
- <span class='type'>(<tt>Hash{Symbol=&gt;Object}</tt>)</span>
651
-
652
-
653
-
654
- </li>
655
-
656
- <li>
657
-
658
- <span class='name'>index_rows</span>
659
-
660
-
661
- <span class='type'>(<tt>Array&lt;Integer&gt;</tt>)</span>
662
-
663
-
664
-
665
- </li>
666
-
667
- </ul>
668
-
669
- <p class="tag_title">Returns:</p>
670
- <ul class="return">
671
-
672
- <li>
673
-
674
-
675
- <span class='type'>(<tt>Hash{Symbol=&gt;Object}</tt>)</span>
676
-
677
-
678
-
679
- </li>
680
-
681
- </ul>
682
-
683
- </div><table class="source_code">
684
- <tr>
685
- <td>
686
- <pre class="lines">
716
+
717
+ </li>
718
+
719
+ </ul>
720
+
721
+ </div>
722
+ <table class="source_code">
723
+ <tr>
724
+ <td>
725
+ <pre class="lines">
687
726
 
688
727
 
689
728
  87
@@ -699,9 +738,9 @@ hash. Otherwise a copy of the input hash is symbolized.</p>
699
738
  97
700
739
  98
701
740
  99</pre>
702
- </td>
703
- <td>
704
- <pre class="code"><span class="info file"># File 'lib/csv_decision/decision.rb', line 87</span>
741
+ </td>
742
+ <td>
743
+ <pre class="code"><span class="info file"># File 'lib/csv_decision2/decision.rb', line 87</span>
705
744
 
706
745
  <span class='kw'>def</span> <span class='id identifier rubyid_index_scan_accumulate'>index_scan_accumulate</span><span class='lparen'>(</span><span class='label'>scan_cols:</span><span class='comma'>,</span> <span class='label'>hash:</span><span class='comma'>,</span> <span class='label'>index_rows:</span><span class='rparen'>)</span>
707
746
  <span class='id identifier rubyid_index_rows'>index_rows</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_start_row'>start_row</span><span class='comma'>,</span> <span class='id identifier rubyid_end_row'>end_row</span><span class='op'>|</span>
@@ -716,89 +755,92 @@ hash. Otherwise a copy of the input hash is symbolized.</p>
716
755
 
717
756
  <span class='ivar'>@rows_picked</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span> <span class='op'>?</span> <span class='lbrace'>{</span><span class='rbrace'>}</span> <span class='op'>:</span> <span class='id identifier rubyid_accumulated_result'>accumulated_result</span>
718
757
  <span class='kw'>end</span></pre>
719
- </td>
720
- </tr>
721
- </table>
722
- </div>
723
-
724
- <div class="method_details ">
725
- <h3 class="signature " id="index_scan_first_match-instance_method">
726
-
727
- #<strong>index_scan_first_match</strong>(scan_cols:, hash:, index_rows:) &#x21d2; <tt>Hash{Symbol=&gt;Object}</tt>
728
-
729
-
730
-
731
-
732
-
733
- </h3><div class="docstring">
734
- <div class="discussion">
735
- <p class="note private">
736
- <strong>This method is part of a private API.</strong>
737
- You should avoid using this method if possible, as it may be removed or be changed in the future.
738
- </p>
739
-
740
- <p>Scan the index for a first match result.</p>
758
+ </td>
759
+ </tr>
760
+ </table>
761
+ </div>
741
762
 
763
+ <div class="method_details ">
764
+ <h3 class="signature " id="index_scan_first_match-instance_method">
765
+
766
+ #<strong>index_scan_first_match</strong>(scan_cols:, hash:, index_rows:) &#x21d2;
767
+ <tt>Hash{Symbol=&gt;Object}</tt>
768
+
769
+
770
+
771
+
772
+
773
+ </h3>
774
+ <div class="docstring">
775
+ <div class="discussion">
776
+ <p class="note private">
777
+ <strong>This method is part of a private API.</strong>
778
+ You should avoid using this method if possible, as it may be removed or be changed in the future.
779
+ </p>
780
+
781
+ <p>Scan the index for a first match result.</p>
782
+
783
+
784
+ </div>
785
+ </div>
786
+ <div class="tags">
787
+ <p class="tag_title">Parameters:</p>
788
+ <ul class="param">
789
+
790
+ <li>
791
+
792
+ <span class='name'>scan_cols</span>
793
+
794
+
795
+ <span class='type'>(<tt>Hash{Integer=&gt;Object}</tt>)</span>
796
+
797
+
798
+
799
+ </li>
800
+
801
+ <li>
802
+
803
+ <span class='name'>hash</span>
804
+
805
+
806
+ <span class='type'>(<tt>Hash{Symbol=&gt;Object}</tt>)</span>
742
807
 
743
- </div>
744
- </div>
745
- <div class="tags">
746
- <p class="tag_title">Parameters:</p>
747
- <ul class="param">
748
-
749
- <li>
750
-
751
- <span class='name'>scan_cols</span>
752
-
753
-
754
- <span class='type'>(<tt>Hash{Integer=&gt;Object}</tt>)</span>
755
-
756
-
757
-
758
- </li>
759
-
760
- <li>
761
-
762
- <span class='name'>hash</span>
763
-
764
-
765
- <span class='type'>(<tt>Hash{Symbol=&gt;Object}</tt>)</span>
766
-
767
-
768
-
769
- </li>
770
-
771
- <li>
772
-
773
- <span class='name'>index_rows</span>
774
-
775
-
776
- <span class='type'>(<tt>Array&lt;Integer&gt;</tt>)</span>
777
-
778
-
779
-
780
- </li>
781
-
782
- </ul>
783
-
784
- <p class="tag_title">Returns:</p>
785
- <ul class="return">
786
-
787
- <li>
788
-
789
-
790
- <span class='type'>(<tt>Hash{Symbol=&gt;Object}</tt>)</span>
791
-
792
-
793
-
794
- </li>
795
-
796
- </ul>
797
-
798
- </div><table class="source_code">
799
- <tr>
800
- <td>
801
- <pre class="lines">
808
+
809
+
810
+ </li>
811
+
812
+ <li>
813
+
814
+ <span class='name'>index_rows</span>
815
+
816
+
817
+ <span class='type'>(<tt>Array&lt;Integer&gt;</tt>)</span>
818
+
819
+
820
+
821
+ </li>
822
+
823
+ </ul>
824
+
825
+ <p class="tag_title">Returns:</p>
826
+ <ul class="return">
827
+
828
+ <li>
829
+
830
+
831
+ <span class='type'>(<tt>Hash{Symbol=&gt;Object}</tt>)</span>
832
+
833
+
834
+
835
+ </li>
836
+
837
+ </ul>
838
+
839
+ </div>
840
+ <table class="source_code">
841
+ <tr>
842
+ <td>
843
+ <pre class="lines">
802
844
 
803
845
 
804
846
  69
@@ -812,9 +854,9 @@ hash. Otherwise a copy of the input hash is symbolized.</p>
812
854
  77
813
855
  78
814
856
  79</pre>
815
- </td>
816
- <td>
817
- <pre class="code"><span class="info file"># File 'lib/csv_decision/decision.rb', line 69</span>
857
+ </td>
858
+ <td>
859
+ <pre class="code"><span class="info file"># File 'lib/csv_decision2/decision.rb', line 69</span>
818
860
 
819
861
  <span class='kw'>def</span> <span class='id identifier rubyid_index_scan_first_match'>index_scan_first_match</span><span class='lparen'>(</span><span class='label'>scan_cols:</span><span class='comma'>,</span> <span class='label'>hash:</span><span class='comma'>,</span> <span class='label'>index_rows:</span><span class='rparen'>)</span>
820
862
  <span class='id identifier rubyid_index_rows'>index_rows</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_start_row'>start_row</span><span class='comma'>,</span> <span class='id identifier rubyid_end_row'>end_row</span><span class='op'>|</span>
@@ -827,59 +869,61 @@ hash. Otherwise a copy of the input hash is symbolized.</p>
827
869
 
828
870
  <span class='lbrace'>{</span><span class='rbrace'>}</span>
829
871
  <span class='kw'>end</span></pre>
830
- </td>
831
- </tr>
832
- </table>
833
- </div>
834
-
835
- <div class="method_details ">
836
- <h3 class="signature " id="input-instance_method">
837
-
838
- #<strong>input</strong>(data) &#x21d2; <tt>void</tt>
839
-
840
-
841
-
842
-
843
-
844
- </h3><div class="docstring">
845
- <div class="discussion">
846
- <p class="note private">
847
- <strong>This method is part of a private API.</strong>
848
- You should avoid using this method if possible, as it may be removed or be changed in the future.
849
- </p>
850
- <p class="note returns_void">This method returns an undefined value.</p>
851
- <p>Initialize the input data used to make the decision.</p>
872
+ </td>
873
+ </tr>
874
+ </table>
875
+ </div>
876
+
877
+ <div class="method_details ">
878
+ <h3 class="signature " id="input-instance_method">
879
+
880
+ #<strong>input</strong>(data) &#x21d2; <tt>void</tt>
881
+
882
+
852
883
 
853
884
 
854
- </div>
855
- </div>
856
- <div class="tags">
857
- <p class="tag_title">Parameters:</p>
858
- <ul class="param">
859
-
860
- <li>
861
-
862
- <span class='name'>data</span>
863
-
864
-
865
- <span class='type'>(<tt>Hash{Symbol=&gt;Object}</tt>)</span>
866
-
867
-
868
-
869
- &mdash;
870
- <div class='inline'>
871
- <p>Input hash data structure.</p>
872
- </div>
873
-
874
- </li>
875
-
876
- </ul>
877
-
878
-
879
- </div><table class="source_code">
880
- <tr>
881
- <td>
882
- <pre class="lines">
885
+
886
+ </h3>
887
+ <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
+ <p class="note returns_void">This method returns an undefined value.</p>
894
+ <p>Initialize the input data used to make the decision.</p>
895
+
896
+
897
+ </div>
898
+ </div>
899
+ <div class="tags">
900
+ <p class="tag_title">Parameters:</p>
901
+ <ul class="param">
902
+
903
+ <li>
904
+
905
+ <span class='name'>data</span>
906
+
907
+
908
+ <span class='type'>(<tt>Hash{Symbol=&gt;Object}</tt>)</span>
909
+
910
+
911
+
912
+ &mdash;
913
+ <div class='inline'>
914
+ <p>Input hash data structure.</p>
915
+ </div>
916
+
917
+ </li>
918
+
919
+ </ul>
920
+
921
+
922
+ </div>
923
+ <table class="source_code">
924
+ <tr>
925
+ <td>
926
+ <pre class="lines">
883
927
 
884
928
 
885
929
  43
@@ -891,9 +935,9 @@ hash. Otherwise a copy of the input hash is symbolized.</p>
891
935
  49
892
936
  50
893
937
  51</pre>
894
- </td>
895
- <td>
896
- <pre class="code"><span class="info file"># File 'lib/csv_decision/decision.rb', line 43</span>
938
+ </td>
939
+ <td>
940
+ <pre class="code"><span class="info file"># File 'lib/csv_decision2/decision.rb', line 43</span>
897
941
 
898
942
  <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>
899
943
  <span class='ivar'>@result</span><span class='period'>.</span><span class='id identifier rubyid_input'>input</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='lbracket'>[</span><span class='symbol'>:hash</span><span class='rbracket'>]</span><span class='rparen'>)</span>
@@ -904,77 +948,79 @@ hash. Otherwise a copy of the input hash is symbolized.</p>
904
948
 
905
949
  <span class='ivar'>@input</span> <span class='op'>=</span> <span class='id identifier rubyid_data'>data</span>
906
950
  <span class='kw'>end</span></pre>
907
- </td>
908
- </tr>
909
- </table>
910
- </div>
911
-
912
- <div class="method_details ">
913
- <h3 class="signature " id="scan-instance_method">
914
-
915
- #<strong>scan</strong>(data) &#x21d2; <tt>Hash{Symbol=&gt;Object}</tt>
916
-
917
-
918
-
919
-
920
-
921
- </h3><div class="docstring">
922
- <div class="discussion">
923
- <p class="note private">
924
- <strong>This method is part of a private API.</strong>
925
- You should avoid using this method if possible, as it may be removed or be changed in the future.
926
- </p>
927
-
928
- <p>Scan the decision table and produce an output decision.</p>
951
+ </td>
952
+ </tr>
953
+ </table>
954
+ </div>
929
955
 
956
+ <div class="method_details ">
957
+ <h3 class="signature " id="scan-instance_method">
930
958
 
931
- </div>
932
- </div>
933
- <div class="tags">
934
- <p class="tag_title">Parameters:</p>
935
- <ul class="param">
936
-
937
- <li>
938
-
939
- <span class='name'>data</span>
940
-
941
-
942
- <span class='type'>(<tt>Hash{Symbol=&gt;Object}</tt>)</span>
943
-
944
-
945
-
946
- &mdash;
947
- <div class='inline'>
948
- <p>Input hash data structure.</p>
949
- </div>
950
-
951
- </li>
952
-
953
- </ul>
954
-
955
- <p class="tag_title">Returns:</p>
956
- <ul class="return">
957
-
958
- <li>
959
-
960
-
961
- <span class='type'>(<tt>Hash{Symbol=&gt;Object}</tt>)</span>
962
-
963
-
964
-
965
- &mdash;
966
- <div class='inline'>
967
- <p>Decision result.</p>
968
- </div>
969
-
970
- </li>
971
-
972
- </ul>
973
-
974
- </div><table class="source_code">
975
- <tr>
976
- <td>
977
- <pre class="lines">
959
+ #<strong>scan</strong>(data) &#x21d2; <tt>Hash{Symbol=&gt;Object}</tt>
960
+
961
+
962
+
963
+
964
+
965
+ </h3>
966
+ <div class="docstring">
967
+ <div class="discussion">
968
+ <p class="note private">
969
+ <strong>This method is part of a private API.</strong>
970
+ You should avoid using this method if possible, as it may be removed or be changed in the future.
971
+ </p>
972
+
973
+ <p>Scan the decision table and produce an output decision.</p>
974
+
975
+
976
+ </div>
977
+ </div>
978
+ <div class="tags">
979
+ <p class="tag_title">Parameters:</p>
980
+ <ul class="param">
981
+
982
+ <li>
983
+
984
+ <span class='name'>data</span>
985
+
986
+
987
+ <span class='type'>(<tt>Hash{Symbol=&gt;Object}</tt>)</span>
988
+
989
+
990
+
991
+ &mdash;
992
+ <div class='inline'>
993
+ <p>Input hash data structure.</p>
994
+ </div>
995
+
996
+ </li>
997
+
998
+ </ul>
999
+
1000
+ <p class="tag_title">Returns:</p>
1001
+ <ul class="return">
1002
+
1003
+ <li>
1004
+
1005
+
1006
+ <span class='type'>(<tt>Hash{Symbol=&gt;Object}</tt>)</span>
1007
+
1008
+
1009
+
1010
+ &mdash;
1011
+ <div class='inline'>
1012
+ <p>Decision result.</p>
1013
+ </div>
1014
+
1015
+ </li>
1016
+
1017
+ </ul>
1018
+
1019
+ </div>
1020
+ <table class="source_code">
1021
+ <tr>
1022
+ <td>
1023
+ <pre class="lines">
978
1024
 
979
1025
 
980
1026
  57
@@ -982,30 +1028,31 @@ hash. Otherwise a copy of the input hash is symbolized.</p>
982
1028
  59
983
1029
  60
984
1030
  61</pre>
985
- </td>
986
- <td>
987
- <pre class="code"><span class="info file"># File 'lib/csv_decision/decision.rb', line 57</span>
1031
+ </td>
1032
+ <td>
1033
+ <pre class="code"><span class="info file"># File 'lib/csv_decision2/decision.rb', line 57</span>
988
1034
 
989
1035
  <span class='kw'>def</span> <span class='id identifier rubyid_scan'>scan</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='rparen'>)</span>
990
1036
  <span class='id identifier rubyid_input'>input</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='rparen'>)</span>
991
1037
  <span class='comment'># Use the table&#39;s index if present
992
1038
  </span> <span class='ivar'>@table</span><span class='period'>.</span><span class='id identifier rubyid_index'>index</span> <span class='op'>?</span> <span class='id identifier rubyid_index_scan'>index_scan</span> <span class='op'>:</span> <span class='id identifier rubyid_table_scan'>table_scan</span>
993
1039
  <span class='kw'>end</span></pre>
994
- </td>
995
- </tr>
996
- </table>
997
- </div>
998
-
999
- </div>
1040
+ </td>
1041
+ </tr>
1042
+ </table>
1043
+ </div>
1000
1044
 
1001
- </div>
1045
+ </div>
1002
1046
 
1003
- <div id="footer">
1004
- Generated on Sun Feb 11 10:26:08 2018 by
1005
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1006
- 0.9.12 (ruby-2.4.0).
1007
- </div>
1047
+ </div>
1008
1048
 
1049
+ <div id="footer">
1050
+ Generated on Sun Feb 11 10:26:08 2018 by
1051
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1052
+ 0.9.12 (ruby-2.4.0).
1009
1053
  </div>
1010
- </body>
1011
- </html>
1054
+
1055
+ </div>
1056
+ </body>
1057
+
1058
+ </html>