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::Index
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::Index
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::Index";
19
- relpath = '../';
20
- </script>
18
+ <script type="text/javascript" charset="utf-8">
19
+ pathId = "CSVDecision2::Index";
20
+ relpath = '../';
21
+ </script>
21
22
 
22
23
 
23
24
  <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
@@ -25,328 +26,350 @@
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 (I)</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">Index</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 (I)</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">Index</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::Index
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::Index</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/index.rb</dd>
101
+ </dl>
102
+
60
103
  </div>
61
104
 
62
- <div id="content"><h1>Class: CSVDecision::Index
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::Index</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/index.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>Build an index for a decision table with one or more input columns
110
- designated as keys</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>
111
112
 
113
+ <p>Build an index for a decision table with one or more input columns
114
+ designated as keys</p>
115
+
116
+
117
+ </div>
118
+ </div>
119
+ <div class="tags">
120
+
121
+
122
+ </div>
123
+
124
+
125
+
126
+ <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
127
+ <ul class="summary">
112
128
 
113
- </div>
114
- </div>
115
- <div class="tags">
116
-
117
-
118
- </div>
119
-
120
-
121
-
122
- <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
123
- <ul class="summary">
124
-
125
- <li class="public ">
126
- <span class="summary_signature">
127
-
128
- <a href="#columns-instance_method" title="#columns (instance method)">#<strong>columns</strong> &#x21d2; Array&lt;Integer&gt; </a>
129
-
130
-
131
-
132
- </span>
133
-
134
-
135
-
136
-
137
- <span class="note title readonly">readonly</span>
138
-
139
-
140
-
141
-
142
-
143
-
144
- <span class="private note title">private</span>
145
-
146
-
147
- <span class="summary_desc"><div class='inline'>
148
- <p>Array of column indices.</p>
149
- </div></span>
150
-
151
- </li>
152
-
153
-
154
- <li class="public ">
155
- <span class="summary_signature">
156
-
157
- <a href="#hash-instance_method" title="#hash (instance method)">#<strong>hash</strong> &#x21d2; Hash </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>The index hash mapping in input values to one or more data array row
178
- indexes.</p>
179
- </div></span>
180
-
181
- </li>
182
-
183
-
184
- </ul>
185
-
186
-
187
-
188
-
189
-
190
- <h2>
191
- Class Method Summary
192
- <small><a href="#" class="summary_toggle">collapse</a></small>
193
- </h2>
194
-
195
- <ul class="summary">
196
-
197
129
  <li class="public ">
198
- <span class="summary_signature">
199
-
200
- <a href="#build-class_method" title="build (class method)">.<strong>build</strong>(table:) &#x21d2; CSVDecision::Index </a>
201
-
202
-
203
-
204
- </span>
205
-
206
-
207
-
208
-
209
-
210
-
211
- <span class="private note title">private</span>
212
-
213
-
214
- <span class="summary_desc"><div class='inline'>
215
- <p>Build the index on the designated number of input columns.</p>
216
- </div></span>
217
-
218
- </li>
219
-
220
-
130
+ <span class="summary_signature">
131
+
132
+ <a href="#columns-instance_method" title="#columns (instance method)">#<strong>columns</strong> &#x21d2;
133
+ Array&lt;Integer&gt; </a>
134
+
135
+
136
+
137
+ </span>
138
+
139
+
140
+
141
+
142
+ <span class="note title readonly">readonly</span>
143
+
144
+
145
+
146
+
147
+
148
+
149
+ <span class="private note title">private</span>
150
+
151
+
152
+ <span class="summary_desc">
153
+ <div class='inline'>
154
+ <p>Array of column indices.</p>
155
+ </div>
156
+ </span>
157
+
158
+ </li>
159
+
160
+
221
161
  <li class="public ">
222
- <span class="summary_signature">
223
-
224
- <a href="#value-class_method" title="value (class method)">.<strong>value</strong>(current_value, index) &#x21d2; Integer, Array </a>
225
-
226
-
227
-
228
- </span>
229
-
230
-
231
-
232
-
233
-
234
-
235
- <span class="private note title">private</span>
236
-
237
-
238
- <span class="summary_desc"><div class='inline'>
239
- <p>New index key value.</p>
240
- </div></span>
241
-
242
- </li>
243
-
244
-
245
- </ul>
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
-
162
+ <span class="summary_signature">
163
+
164
+ <a href="#hash-instance_method" title="#hash (instance method)">#<strong>hash</strong> &#x21d2; Hash </a>
165
+
166
+
167
+
168
+ </span>
169
+
170
+
171
+
172
+
173
+ <span class="note title readonly">readonly</span>
174
+
175
+
176
+
177
+
178
+
179
+
180
+ <span class="private note title">private</span>
181
+
182
+
183
+ <span class="summary_desc">
184
+ <div class='inline'>
185
+ <p>The index hash mapping in input values to one or more data array row
186
+ indexes.</p>
187
+ </div>
188
+ </span>
189
+
190
+ </li>
191
+
192
+
193
+ </ul>
194
+
195
+
196
+
197
+
198
+
199
+ <h2>
200
+ Class Method Summary
201
+ <small><a href="#" class="summary_toggle">collapse</a></small>
202
+ </h2>
203
+
204
+ <ul class="summary">
205
+
254
206
  <li class="public ">
255
- <span class="summary_signature">
256
-
257
- <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(table:, columns:) &#x21d2; Index </a>
258
-
259
-
260
-
261
- </span>
262
-
263
-
264
- <span class="note title constructor">constructor</span>
265
-
266
-
267
-
268
-
269
-
270
- <span class="private note title">private</span>
271
-
272
-
273
- <span class="summary_desc"><div class='inline'>
274
- <p>A new instance of Index.</p>
275
- </div></span>
276
-
277
- </li>
278
-
279
-
280
- </ul>
281
-
282
-
283
- <div id="constructor_details" class="method_details_list">
284
- <h2>Constructor Details</h2>
285
-
286
- <div class="method_details first">
287
- <h3 class="signature first" id="initialize-instance_method">
288
-
289
- #<strong>initialize</strong>(table:, columns:) &#x21d2; <tt><span class='object_link'><a href="" title="CSVDecision::Index (class)">Index</a></span></tt>
290
-
291
-
292
-
293
-
294
-
295
- </h3><div class="docstring">
296
- <div class="discussion">
297
- <p class="note private">
298
- <strong>This method is part of a private API.</strong>
299
- You should avoid using this method if possible, as it may be removed or be changed in the future.
300
- </p>
301
-
302
- <p>Returns a new instance of Index</p>
207
+ <span class="summary_signature">
303
208
 
209
+ <a href="#build-class_method" title="build (class method)">.<strong>build</strong>(table:) &#x21d2;
210
+ CSVDecision2::Index </a>
304
211
 
305
- </div>
306
- </div>
307
- <div class="tags">
308
- <p class="tag_title">Parameters:</p>
309
- <ul class="param">
310
-
311
- <li>
312
-
313
- <span class='name'>table</span>
314
-
315
-
316
- <span class='type'>(<tt><span class='object_link'><a href="Table.html" title="CSVDecision::Table (class)">CSVDecision::Table</a></span></tt>)</span>
317
-
318
-
319
-
320
- &mdash;
321
- <div class='inline'>
322
- <p>Decision table.</p>
323
- </div>
324
-
325
- </li>
326
-
327
- <li>
328
-
329
- <span class='name'>columns</span>
330
-
331
-
332
- <span class='type'>(<tt>Array&lt;<span class='object_link'><a href="" title="CSVDecision::Index (class)">Index</a></span>&gt;</tt>)</span>
333
-
334
-
335
-
336
- &mdash;
337
- <div class='inline'>
338
- <p>Array of column indexes to be indexed.</p>
339
- </div>
340
-
341
- </li>
342
-
343
- </ul>
344
-
345
-
346
- </div><table class="source_code">
347
- <tr>
348
- <td>
349
- <pre class="lines">
212
+
213
+
214
+ </span>
215
+
216
+
217
+
218
+
219
+
220
+
221
+ <span class="private note title">private</span>
222
+
223
+
224
+ <span class="summary_desc">
225
+ <div class='inline'>
226
+ <p>Build the index on the designated number of input columns.</p>
227
+ </div>
228
+ </span>
229
+
230
+ </li>
231
+
232
+
233
+ <li class="public ">
234
+ <span class="summary_signature">
235
+
236
+ <a href="#value-class_method" title="value (class method)">.<strong>value</strong>(current_value, index)
237
+ &#x21d2; Integer, Array </a>
238
+
239
+
240
+
241
+ </span>
242
+
243
+
244
+
245
+
246
+
247
+
248
+ <span class="private note title">private</span>
249
+
250
+
251
+ <span class="summary_desc">
252
+ <div class='inline'>
253
+ <p>New index key value.</p>
254
+ </div>
255
+ </span>
256
+
257
+ </li>
258
+
259
+
260
+ </ul>
261
+
262
+ <h2>
263
+ Instance Method Summary
264
+ <small><a href="#" class="summary_toggle">collapse</a></small>
265
+ </h2>
266
+
267
+ <ul class="summary">
268
+
269
+ <li class="public ">
270
+ <span class="summary_signature">
271
+
272
+ <a href="#initialize-instance_method"
273
+ title="#initialize (instance method)">#<strong>initialize</strong>(table:, columns:) &#x21d2; Index </a>
274
+
275
+
276
+
277
+ </span>
278
+
279
+
280
+ <span class="note title constructor">constructor</span>
281
+
282
+
283
+
284
+
285
+
286
+ <span class="private note title">private</span>
287
+
288
+
289
+ <span class="summary_desc">
290
+ <div class='inline'>
291
+ <p>A new instance of Index.</p>
292
+ </div>
293
+ </span>
294
+
295
+ </li>
296
+
297
+
298
+ </ul>
299
+
300
+
301
+ <div id="constructor_details" class="method_details_list">
302
+ <h2>Constructor Details</h2>
303
+
304
+ <div class="method_details first">
305
+ <h3 class="signature first" id="initialize-instance_method">
306
+
307
+ #<strong>initialize</strong>(table:, columns:) &#x21d2; <tt><span class='object_link'><a href=""
308
+ title="CSVDecision2::Index (class)">Index</a></span></tt>
309
+
310
+
311
+
312
+
313
+
314
+ </h3>
315
+ <div class="docstring">
316
+ <div class="discussion">
317
+ <p class="note private">
318
+ <strong>This method is part of a private API.</strong>
319
+ You should avoid using this method if possible, as it may be removed or be changed in the future.
320
+ </p>
321
+
322
+ <p>Returns a new instance of Index</p>
323
+
324
+
325
+ </div>
326
+ </div>
327
+ <div class="tags">
328
+ <p class="tag_title">Parameters:</p>
329
+ <ul class="param">
330
+
331
+ <li>
332
+
333
+ <span class='name'>table</span>
334
+
335
+
336
+ <span class='type'>(<tt><span class='object_link'><a href="Table.html"
337
+ title="CSVDecision2::Table (class)">CSVDecision2::Table</a></span></tt>)</span>
338
+
339
+
340
+
341
+ &mdash;
342
+ <div class='inline'>
343
+ <p>Decision table.</p>
344
+ </div>
345
+
346
+ </li>
347
+
348
+ <li>
349
+
350
+ <span class='name'>columns</span>
351
+
352
+
353
+ <span class='type'>(<tt>Array&lt;<span class='object_link'><a href=""
354
+ title="CSVDecision2::Index (class)">Index</a></span>&gt;</tt>)</span>
355
+
356
+
357
+
358
+ &mdash;
359
+ <div class='inline'>
360
+ <p>Array of column indexes to be indexed.</p>
361
+ </div>
362
+
363
+ </li>
364
+
365
+ </ul>
366
+
367
+
368
+ </div>
369
+ <table class="source_code">
370
+ <tr>
371
+ <td>
372
+ <pre class="lines">
350
373
 
351
374
 
352
375
  79
@@ -357,9 +380,9 @@ indexes.</p>
357
380
  84
358
381
  85
359
382
  86</pre>
360
- </td>
361
- <td>
362
- <pre class="code"><span class="info file"># File 'lib/csv_decision/index.rb', line 79</span>
383
+ </td>
384
+ <td>
385
+ <pre class="code"><span class="info file"># File 'lib/csv_decision2/index.rb', line 79</span>
363
386
 
364
387
  <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='label'>table:</span><span class='comma'>,</span> <span class='label'>columns:</span><span class='rparen'>)</span>
365
388
  <span class='ivar'>@columns</span> <span class='op'>=</span> <span class='id identifier rubyid_columns'>columns</span>
@@ -369,221 +392,230 @@ indexes.</p>
369
392
 
370
393
  <span class='id identifier rubyid_freeze'>freeze</span>
371
394
  <span class='kw'>end</span></pre>
372
- </td>
373
- </tr>
374
- </table>
375
- </div>
376
-
377
- </div>
378
-
379
- <div id="instance_attr_details" class="attr_details">
380
- <h2>Instance Attribute Details</h2>
381
-
382
-
383
- <span id=""></span>
384
- <div class="method_details first">
385
- <h3 class="signature first" id="columns-instance_method">
386
-
387
- #<strong>columns</strong> &#x21d2; <tt>Array&lt;Integer&gt;</tt> <span class="extras">(readonly)</span>
388
-
389
-
390
-
391
-
392
-
393
- </h3><div class="docstring">
394
- <div class="discussion">
395
- <p class="note private">
396
- <strong>This method is part of a private API.</strong>
397
- You should avoid using this method if possible, as it may be removed or be changed in the future.
398
- </p>
399
-
400
- <p>Returns Array of column indices</p>
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="columns-instance_method">
409
+
410
+ #<strong>columns</strong> &#x21d2; <tt>Array&lt;Integer&gt;</tt> <span class="extras">(readonly)</span>
411
+
401
412
 
402
413
 
403
- </div>
404
- </div>
405
- <div class="tags">
406
-
407
- <p class="tag_title">Returns:</p>
408
- <ul class="return">
409
-
410
- <li>
411
-
412
-
413
- <span class='type'>(<tt>Array&lt;Integer&gt;</tt>)</span>
414
-
415
-
416
-
417
- &mdash;
418
- <div class='inline'>
419
- <p>Array of column indices</p>
420
- </div>
421
-
422
- </li>
423
-
424
- </ul>
425
-
426
- </div><table class="source_code">
427
- <tr>
428
- <td>
429
- <pre class="lines">
414
+
415
+
416
+ </h3>
417
+ <div class="docstring">
418
+ <div class="discussion">
419
+ <p class="note private">
420
+ <strong>This method is part of a private API.</strong>
421
+ You should avoid using this method if possible, as it may be removed or be changed in the future.
422
+ </p>
423
+
424
+ <p>Returns Array of column indices</p>
425
+
426
+
427
+ </div>
428
+ </div>
429
+ <div class="tags">
430
+
431
+ <p class="tag_title">Returns:</p>
432
+ <ul class="return">
433
+
434
+ <li>
435
+
436
+
437
+ <span class='type'>(<tt>Array&lt;Integer&gt;</tt>)</span>
438
+
439
+
440
+
441
+ &mdash;
442
+ <div class='inline'>
443
+ <p>Array of column indices</p>
444
+ </div>
445
+
446
+ </li>
447
+
448
+ </ul>
449
+
450
+ </div>
451
+ <table class="source_code">
452
+ <tr>
453
+ <td>
454
+ <pre class="lines">
430
455
 
431
456
 
432
457
  75
433
458
  76
434
459
  77</pre>
435
- </td>
436
- <td>
437
- <pre class="code"><span class="info file"># File 'lib/csv_decision/index.rb', line 75</span>
460
+ </td>
461
+ <td>
462
+ <pre class="code"><span class="info file"># File 'lib/csv_decision2/index.rb', line 75</span>
438
463
 
439
464
  <span class='kw'>def</span> <span class='id identifier rubyid_columns'>columns</span>
440
465
  <span class='ivar'>@columns</span>
441
466
  <span class='kw'>end</span></pre>
442
- </td>
443
- </tr>
444
- </table>
445
- </div>
446
-
447
-
448
- <span id=""></span>
449
- <div class="method_details ">
450
- <h3 class="signature " id="hash-instance_method">
451
-
452
- #<strong>hash</strong> &#x21d2; <tt>Hash</tt> <span class="extras">(readonly)</span>
453
-
454
-
455
-
456
-
457
-
458
- </h3><div class="docstring">
459
- <div class="discussion">
460
- <p class="note private">
461
- <strong>This method is part of a private API.</strong>
462
- You should avoid using this method if possible, as it may be removed or be changed in the future.
463
- </p>
464
-
465
- <p>Returns The index hash mapping in input values to one or more data array
466
- row indexes.</p>
467
+ </td>
468
+ </tr>
469
+ </table>
470
+ </div>
467
471
 
468
472
 
469
- </div>
470
- </div>
471
- <div class="tags">
472
-
473
- <p class="tag_title">Returns:</p>
474
- <ul class="return">
475
-
476
- <li>
477
-
478
-
479
- <span class='type'>(<tt>Hash</tt>)</span>
480
-
481
-
482
-
483
- &mdash;
484
- <div class='inline'>
485
- <p>The index hash mapping in input values to one or more data array row
486
- indexes.</p>
487
- </div>
488
-
489
- </li>
490
-
491
- </ul>
492
-
493
- </div><table class="source_code">
494
- <tr>
495
- <td>
496
- <pre class="lines">
473
+ <span id=""></span>
474
+ <div class="method_details ">
475
+ <h3 class="signature " id="hash-instance_method">
476
+
477
+ #<strong>hash</strong> &#x21d2; <tt>Hash</tt> <span class="extras">(readonly)</span>
478
+
479
+
480
+
481
+
482
+
483
+ </h3>
484
+ <div class="docstring">
485
+ <div class="discussion">
486
+ <p class="note private">
487
+ <strong>This method is part of a private API.</strong>
488
+ You should avoid using this method if possible, as it may be removed or be changed in the future.
489
+ </p>
490
+
491
+ <p>Returns The index hash mapping in input values to one or more data array
492
+ row indexes.</p>
493
+
494
+
495
+ </div>
496
+ </div>
497
+ <div class="tags">
498
+
499
+ <p class="tag_title">Returns:</p>
500
+ <ul class="return">
501
+
502
+ <li>
503
+
504
+
505
+ <span class='type'>(<tt>Hash</tt>)</span>
506
+
507
+
508
+
509
+ &mdash;
510
+ <div class='inline'>
511
+ <p>The index hash mapping in input values to one or more data array row
512
+ indexes.</p>
513
+ </div>
514
+
515
+ </li>
516
+
517
+ </ul>
518
+
519
+ </div>
520
+ <table class="source_code">
521
+ <tr>
522
+ <td>
523
+ <pre class="lines">
497
524
 
498
525
 
499
526
  72
500
527
  73
501
528
  74</pre>
502
- </td>
503
- <td>
504
- <pre class="code"><span class="info file"># File 'lib/csv_decision/index.rb', line 72</span>
529
+ </td>
530
+ <td>
531
+ <pre class="code"><span class="info file"># File 'lib/csv_decision2/index.rb', line 72</span>
505
532
 
506
533
  <span class='kw'>def</span> <span class='id identifier rubyid_hash'>hash</span>
507
534
  <span class='ivar'>@hash</span>
508
535
  <span class='kw'>end</span></pre>
509
- </td>
510
- </tr>
511
- </table>
512
- </div>
513
-
514
- </div>
536
+ </td>
537
+ </tr>
538
+ </table>
539
+ </div>
515
540
 
541
+ </div>
516
542
 
517
- <div id="class_method_details" class="method_details_list">
518
- <h2>Class Method Details</h2>
519
543
 
520
-
521
- <div class="method_details first">
522
- <h3 class="signature first" id="build-class_method">
523
-
524
- .<strong>build</strong>(table:) &#x21d2; <tt><span class='object_link'><a href="" title="CSVDecision::Index (class)">CSVDecision::Index</a></span></tt>
525
-
544
+ <div id="class_method_details" class="method_details_list">
545
+ <h2>Class Method Details</h2>
526
546
 
527
-
528
547
 
529
-
530
- </h3><div class="docstring">
531
- <div class="discussion">
532
- <p class="note private">
533
- <strong>This method is part of a private API.</strong>
534
- You should avoid using this method if possible, as it may be removed or be changed in the future.
535
- </p>
548
+ <div class="method_details first">
549
+ <h3 class="signature first" id="build-class_method">
536
550
 
537
- <p>Build the index on the designated number of input columns.</p>
551
+ .<strong>build</strong>(table:) &#x21d2; <tt><span class='object_link'><a href=""
552
+ title="CSVDecision2::Index (class)">CSVDecision2::Index</a></span></tt>
538
553
 
539
554
 
540
- </div>
541
- </div>
542
- <div class="tags">
543
- <p class="tag_title">Parameters:</p>
544
- <ul class="param">
545
-
546
- <li>
547
-
548
- <span class='name'>table</span>
549
-
550
-
551
- <span class='type'>(<tt><span class='object_link'><a href="Table.html" title="CSVDecision::Table (class)">CSVDecision::Table</a></span></tt>)</span>
552
-
553
-
554
-
555
- &mdash;
556
- <div class='inline'>
557
- <p>Decision table being indexed.</p>
558
- </div>
559
-
560
- </li>
561
-
562
- </ul>
563
-
564
- <p class="tag_title">Returns:</p>
565
- <ul class="return">
566
-
567
- <li>
568
-
569
-
570
- <span class='type'>(<tt><span class='object_link'><a href="" title="CSVDecision::Index (class)">CSVDecision::Index</a></span></tt>)</span>
571
-
572
-
573
-
574
- &mdash;
575
- <div class='inline'>
576
- <p>The built index.</p>
577
- </div>
578
-
579
- </li>
580
-
581
- </ul>
582
-
583
- </div><table class="source_code">
584
- <tr>
585
- <td>
586
- <pre class="lines">
555
+
556
+
557
+
558
+ </h3>
559
+ <div class="docstring">
560
+ <div class="discussion">
561
+ <p class="note private">
562
+ <strong>This method is part of a private API.</strong>
563
+ You should avoid using this method if possible, as it may be removed or be changed in the future.
564
+ </p>
565
+
566
+ <p>Build the index on the designated number of input columns.</p>
567
+
568
+
569
+ </div>
570
+ </div>
571
+ <div class="tags">
572
+ <p class="tag_title">Parameters:</p>
573
+ <ul class="param">
574
+
575
+ <li>
576
+
577
+ <span class='name'>table</span>
578
+
579
+
580
+ <span class='type'>(<tt><span class='object_link'><a href="Table.html"
581
+ title="CSVDecision2::Table (class)">CSVDecision2::Table</a></span></tt>)</span>
582
+
583
+
584
+
585
+ &mdash;
586
+ <div class='inline'>
587
+ <p>Decision table being indexed.</p>
588
+ </div>
589
+
590
+ </li>
591
+
592
+ </ul>
593
+
594
+ <p class="tag_title">Returns:</p>
595
+ <ul class="return">
596
+
597
+ <li>
598
+
599
+
600
+ <span class='type'>(<tt><span class='object_link'><a href=""
601
+ title="CSVDecision2::Index (class)">CSVDecision2::Index</a></span></tt>)</span>
602
+
603
+
604
+
605
+ &mdash;
606
+ <div class='inline'>
607
+ <p>The built index.</p>
608
+ </div>
609
+
610
+ </li>
611
+
612
+ </ul>
613
+
614
+ </div>
615
+ <table class="source_code">
616
+ <tr>
617
+ <td>
618
+ <pre class="lines">
587
619
 
588
620
 
589
621
  16
@@ -598,109 +630,111 @@ indexes.</p>
598
630
  25
599
631
  26
600
632
  27</pre>
601
- </td>
602
- <td>
603
- <pre class="code"><span class="info file"># File 'lib/csv_decision/index.rb', line 16</span>
633
+ </td>
634
+ <td>
635
+ <pre class="code"><span class="info file"># File 'lib/csv_decision2/index.rb', line 16</span>
604
636
 
605
637
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_build'>build</span><span class='lparen'>(</span><span class='label'>table:</span><span class='rparen'>)</span>
606
638
  <span class='comment'># Do we even have an index?
607
639
  </span> <span class='id identifier rubyid_key_cols'>key_cols</span> <span class='op'>=</span> <span class='id identifier rubyid_index_columns'>index_columns</span><span class='lparen'>(</span><span class='label'>columns:</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_ins'>ins</span><span class='rparen'>)</span>
608
640
  <span class='kw'>return</span> <span class='kw'>if</span> <span class='id identifier rubyid_key_cols'>key_cols</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
609
641
 
610
- <span class='id identifier rubyid_table'>table</span><span class='period'>.</span><span class='id identifier rubyid_index'>index</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="" title="CSVDecision::Index (class)">Index</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="CSVDecision::Index#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='comma'>,</span> <span class='label'>columns:</span> <span class='id identifier rubyid_key_cols'>key_cols</span><span class='rparen'>)</span>
642
+ <span class='id identifier rubyid_table'>table</span><span class='period'>.</span><span class='id identifier rubyid_index'>index</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="" title="CSVDecision2::Index (class)">Index</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="CSVDecision2::Index#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='comma'>,</span> <span class='label'>columns:</span> <span class='id identifier rubyid_key_cols'>key_cols</span><span class='rparen'>)</span>
611
643
 
612
644
  <span class='comment'># Indexed columns do not need to be scanned
613
645
  </span> <span class='id identifier rubyid_trim_scan_rows'>trim_scan_rows</span><span class='lparen'>(</span><span class='label'>scan_rows:</span> <span class='id identifier rubyid_table'>table</span><span class='period'>.</span><span class='id identifier rubyid_scan_rows'>scan_rows</span><span class='comma'>,</span> <span class='label'>index_columns:</span> <span class='id identifier rubyid_table'>table</span><span class='period'>.</span><span class='id identifier rubyid_index'>index</span><span class='period'>.</span><span class='id identifier rubyid_columns'>columns</span><span class='rparen'>)</span>
614
646
 
615
647
  <span class='id identifier rubyid_table'>table</span>
616
648
  <span class='kw'>end</span></pre>
617
- </td>
618
- </tr>
619
- </table>
620
- </div>
621
-
622
- <div class="method_details ">
623
- <h3 class="signature " id="value-class_method">
624
-
625
- .<strong>value</strong>(current_value, index) &#x21d2; <tt>Integer</tt>, <tt>Array</tt>
626
-
627
-
628
-
629
-
630
-
631
- </h3><div class="docstring">
632
- <div class="discussion">
633
- <p class="note private">
634
- <strong>This method is part of a private API.</strong>
635
- You should avoid using this method if possible, as it may be removed or be changed in the future.
636
- </p>
637
-
638
- <p>Returns New index key value.</p>
649
+ </td>
650
+ </tr>
651
+ </table>
652
+ </div>
639
653
 
654
+ <div class="method_details ">
655
+ <h3 class="signature " id="value-class_method">
640
656
 
641
- </div>
642
- </div>
643
- <div class="tags">
644
- <p class="tag_title">Parameters:</p>
645
- <ul class="param">
646
-
647
- <li>
648
-
649
- <span class='name'>current_value</span>
650
-
651
-
652
- <span class='type'>(<tt>Integer</tt>, <tt>Array</tt>)</span>
653
-
654
-
655
-
656
- &mdash;
657
- <div class='inline'>
658
- <p>Current index key value.</p>
659
- </div>
660
-
661
- </li>
662
-
663
- <li>
664
-
665
- <span class='name'>index</span>
666
-
667
-
668
- <span class='type'>(<tt>Integer</tt>)</span>
669
-
670
-
671
-
672
- &mdash;
673
- <div class='inline'>
674
- <p>Array row index to be included in the table index entry.</p>
675
- </div>
676
-
677
- </li>
678
-
679
- </ul>
680
-
681
- <p class="tag_title">Returns:</p>
682
- <ul class="return">
683
-
684
- <li>
685
-
686
-
687
- <span class='type'>(<tt>Integer</tt>, <tt>Array</tt>)</span>
688
-
689
-
690
-
691
- &mdash;
692
- <div class='inline'>
693
- <p>New index key value.</p>
694
- </div>
695
-
696
- </li>
697
-
698
- </ul>
699
-
700
- </div><table class="source_code">
701
- <tr>
702
- <td>
703
- <pre class="lines">
657
+ .<strong>value</strong>(current_value, index) &#x21d2; <tt>Integer</tt>, <tt>Array</tt>
658
+
659
+
660
+
661
+
662
+
663
+ </h3>
664
+ <div class="docstring">
665
+ <div class="discussion">
666
+ <p class="note private">
667
+ <strong>This method is part of a private API.</strong>
668
+ You should avoid using this method if possible, as it may be removed or be changed in the future.
669
+ </p>
670
+
671
+ <p>Returns New index key value.</p>
672
+
673
+
674
+ </div>
675
+ </div>
676
+ <div class="tags">
677
+ <p class="tag_title">Parameters:</p>
678
+ <ul class="param">
679
+
680
+ <li>
681
+
682
+ <span class='name'>current_value</span>
683
+
684
+
685
+ <span class='type'>(<tt>Integer</tt>, <tt>Array</tt>)</span>
686
+
687
+
688
+
689
+ &mdash;
690
+ <div class='inline'>
691
+ <p>Current index key value.</p>
692
+ </div>
693
+
694
+ </li>
695
+
696
+ <li>
697
+
698
+ <span class='name'>index</span>
699
+
700
+
701
+ <span class='type'>(<tt>Integer</tt>)</span>
702
+
703
+
704
+
705
+ &mdash;
706
+ <div class='inline'>
707
+ <p>Array row index to be included in the table index entry.</p>
708
+ </div>
709
+
710
+ </li>
711
+
712
+ </ul>
713
+
714
+ <p class="tag_title">Returns:</p>
715
+ <ul class="return">
716
+
717
+ <li>
718
+
719
+
720
+ <span class='type'>(<tt>Integer</tt>, <tt>Array</tt>)</span>
721
+
722
+
723
+
724
+ &mdash;
725
+ <div class='inline'>
726
+ <p>New index key value.</p>
727
+ </div>
728
+
729
+ </li>
730
+
731
+ </ul>
732
+
733
+ </div>
734
+ <table class="source_code">
735
+ <tr>
736
+ <td>
737
+ <pre class="lines">
704
738
 
705
739
 
706
740
  32
@@ -710,9 +744,9 @@ indexes.</p>
710
744
  36
711
745
  37
712
746
  38</pre>
713
- </td>
714
- <td>
715
- <pre class="code"><span class="info file"># File 'lib/csv_decision/index.rb', line 32</span>
747
+ </td>
748
+ <td>
749
+ <pre class="code"><span class="info file"># File 'lib/csv_decision2/index.rb', line 32</span>
716
750
 
717
751
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='lparen'>(</span><span class='id identifier rubyid_current_value'>current_value</span><span class='comma'>,</span> <span class='id identifier rubyid_index'>index</span><span class='rparen'>)</span>
718
752
  <span class='kw'>return</span> <span class='id identifier rubyid_integer_value'>integer_value</span><span class='lparen'>(</span><span class='id identifier rubyid_current_value'>current_value</span><span class='comma'>,</span> <span class='id identifier rubyid_index'>index</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_current_value'>current_value</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Integer</span><span class='rparen'>)</span>
@@ -721,21 +755,22 @@ indexes.</p>
721
755
 
722
756
  <span class='id identifier rubyid_current_value'>current_value</span>
723
757
  <span class='kw'>end</span></pre>
724
- </td>
725
- </tr>
726
- </table>
727
- </div>
728
-
729
- </div>
758
+ </td>
759
+ </tr>
760
+ </table>
761
+ </div>
730
762
 
731
- </div>
763
+ </div>
732
764
 
733
- <div id="footer">
734
- Generated on Sun Feb 11 10:26:07 2018 by
735
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
736
- 0.9.12 (ruby-2.4.0).
737
- </div>
765
+ </div>
738
766
 
767
+ <div id="footer">
768
+ Generated on Sun Feb 11 10:26:07 2018 by
769
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
770
+ 0.9.12 (ruby-2.4.0).
739
771
  </div>
740
- </body>
741
- </html>
772
+
773
+ </div>
774
+ </body>
775
+
776
+ </html>