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.
- checksums.yaml +4 -4
- data/Dockerfile +1 -1
- data/README.md +16 -16
- data/benchmarks/rufus_decision.rb +5 -7
- data/csv_decision2.gemspec +2 -2
- data/doc/CSVDecision/CellValidationError.html +117 -110
- data/doc/CSVDecision/Columns/Default.html +537 -508
- data/doc/CSVDecision/Columns/Dictionary.html +729 -686
- data/doc/CSVDecision/Columns/Entry.html +457 -433
- data/doc/CSVDecision/Columns.html +1134 -1051
- data/doc/CSVDecision/Constant.html +205 -191
- data/doc/CSVDecision/Data.html +423 -398
- data/doc/CSVDecision/Decide.html +236 -225
- data/doc/CSVDecision/Decision.html +872 -825
- data/doc/CSVDecision/Defaults.html +243 -230
- data/doc/CSVDecision/Dictionary/Entry.html +1026 -964
- data/doc/CSVDecision/Dictionary.html +377 -355
- data/doc/CSVDecision/Error.html +116 -105
- data/doc/CSVDecision/FileError.html +117 -110
- data/doc/CSVDecision/Function.html +181 -168
- data/doc/CSVDecision/Guard.html +200 -185
- data/doc/CSVDecision/Header.html +557 -523
- data/doc/CSVDecision/Index.html +652 -617
- data/doc/CSVDecision/Input.html +329 -312
- data/doc/CSVDecision/Load.html +232 -220
- data/doc/CSVDecision/Matchers/Constant.html +432 -399
- data/doc/CSVDecision/Matchers/Function.html +451 -415
- data/doc/CSVDecision/Matchers/Guard.html +459 -424
- data/doc/CSVDecision/Matchers/Matcher.html +470 -426
- data/doc/CSVDecision/Matchers/Numeric.html +375 -346
- data/doc/CSVDecision/Matchers/Pattern.html +429 -396
- data/doc/CSVDecision/Matchers/Proc.html +617 -575
- data/doc/CSVDecision/Matchers/Range.html +331 -302
- data/doc/CSVDecision/Matchers/Symbol.html +386 -353
- data/doc/CSVDecision/Matchers.html +1509 -1393
- data/doc/CSVDecision/Numeric.html +201 -188
- data/doc/CSVDecision/Options.html +376 -357
- data/doc/CSVDecision/Parse.html +217 -204
- data/doc/CSVDecision/Paths.html +664 -629
- data/doc/CSVDecision/Result.html +1076 -1005
- data/doc/CSVDecision/Scan/InputHashes.html +305 -288
- data/doc/CSVDecision/Scan.html +262 -249
- data/doc/CSVDecision/ScanRow.html +749 -705
- data/doc/CSVDecision/Symbol.html +204 -191
- data/doc/CSVDecision/Table.html +1391 -1305
- data/doc/CSVDecision/TableValidationError.html +117 -110
- data/doc/CSVDecision/Validate.html +353 -337
- data/doc/CSVDecision.html +623 -552
- data/doc/_index.html +488 -448
- data/doc/class_list.html +250 -45
- data/doc/file.README.html +304 -278
- data/doc/index.html +304 -278
- data/doc/method_list.html +1159 -1017
- data/doc/top-level-namespace.html +79 -75
- data/lib/{csv_decision → csv_decision2}/columns.rb +7 -7
- data/lib/{csv_decision → csv_decision2}/data.rb +1 -1
- data/lib/{csv_decision → csv_decision2}/decision.rb +5 -5
- data/lib/{csv_decision → csv_decision2}/defaults.rb +2 -2
- data/lib/{csv_decision → csv_decision2}/dictionary.rb +2 -2
- data/lib/{csv_decision → csv_decision2}/header.rb +5 -5
- data/lib/{csv_decision → csv_decision2}/index.rb +5 -5
- data/lib/{csv_decision → csv_decision2}/input.rb +3 -3
- data/lib/{csv_decision → csv_decision2}/load.rb +6 -6
- data/lib/{csv_decision → csv_decision2}/matchers/constant.rb +2 -2
- data/lib/{csv_decision → csv_decision2}/matchers/function.rb +2 -2
- data/lib/{csv_decision → csv_decision2}/matchers/guard.rb +2 -2
- data/lib/{csv_decision → csv_decision2}/matchers/numeric.rb +2 -2
- data/lib/{csv_decision → csv_decision2}/matchers/pattern.rb +2 -2
- data/lib/{csv_decision → csv_decision2}/matchers/range.rb +2 -2
- data/lib/{csv_decision → csv_decision2}/matchers/symbol.rb +2 -2
- data/lib/{csv_decision → csv_decision2}/matchers.rb +5 -5
- data/lib/{csv_decision → csv_decision2}/options.rb +3 -3
- data/lib/{csv_decision → csv_decision2}/parse.rb +14 -14
- data/lib/{csv_decision → csv_decision2}/paths.rb +5 -5
- data/lib/{csv_decision → csv_decision2}/result.rb +2 -2
- data/lib/{csv_decision → csv_decision2}/scan.rb +3 -3
- data/lib/{csv_decision → csv_decision2}/scan_row.rb +2 -2
- data/lib/{csv_decision → csv_decision2}/table.rb +8 -8
- data/lib/{csv_decision → csv_decision2}/validate.rb +2 -2
- data/lib/csv_decision2.rb +45 -0
- data/spec/{csv_decision → csv_decision2}/columns_spec.rb +44 -44
- data/spec/{csv_decision → csv_decision2}/constant_spec.rb +4 -4
- data/spec/{csv_decision → csv_decision2}/data_spec.rb +11 -11
- data/spec/{csv_decision → csv_decision2}/decision_spec.rb +6 -6
- data/spec/{csv_decision → csv_decision2}/examples_spec.rb +14 -14
- data/spec/{csv_decision → csv_decision2}/index_spec.rb +8 -8
- data/spec/{csv_decision → csv_decision2}/input_spec.rb +9 -9
- data/spec/{csv_decision → csv_decision2}/load_spec.rb +8 -8
- data/spec/{csv_decision → csv_decision2}/matchers/function_spec.rb +7 -7
- data/spec/{csv_decision → csv_decision2}/matchers/guard_spec.rb +14 -14
- data/spec/{csv_decision → csv_decision2}/matchers/numeric_spec.rb +5 -5
- data/spec/{csv_decision → csv_decision2}/matchers/pattern_spec.rb +6 -6
- data/spec/{csv_decision → csv_decision2}/matchers/range_spec.rb +5 -5
- data/spec/{csv_decision → csv_decision2}/matchers/symbol_spec.rb +6 -6
- data/spec/{csv_decision → csv_decision2}/options_spec.rb +18 -18
- data/spec/csv_decision2/parse_spec.rb +44 -0
- data/spec/{csv_decision → csv_decision2}/table_spec.rb +17 -17
- data/spec/csv_decision2_spec.rb +7 -0
- metadata +64 -64
- data/lib/csv_decision.rb +0 -45
- data/spec/csv_decision/parse_spec.rb +0 -44
- data/spec/csv_decision_spec.rb +0 -7
data/doc/CSVDecision/Index.html
CHANGED
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<html>
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
<meta
|
|
6
|
-
<
|
|
7
|
-
|
|
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
|
— 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
|
-
|
|
19
|
-
|
|
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
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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> »
|
|
42
|
+
<span class='title'><span class='object_link'><a href="../CSVDecision2.html"
|
|
43
|
+
title="CSVDecision (module)">CSVDecision</a></span></span>
|
|
44
|
+
»
|
|
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="
|
|
36
|
-
<
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
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
|
-
<
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
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> ⇒ Array<Integer> </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> ⇒ 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
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
130
|
+
<span class="summary_signature">
|
|
131
|
+
|
|
132
|
+
<a href="#columns-instance_method" title="#columns (instance method)">#<strong>columns</strong> ⇒
|
|
133
|
+
Array<Integer> </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
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
</
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
162
|
+
<span class="summary_signature">
|
|
163
|
+
|
|
164
|
+
<a href="#hash-instance_method" title="#hash (instance method)">#<strong>hash</strong> ⇒ 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
|
-
|
|
256
|
-
|
|
257
|
-
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(table:, columns:) ⇒ 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:) ⇒ <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:) ⇒
|
|
210
|
+
CSVDecision2::Index </a>
|
|
304
211
|
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
</
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
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
|
+
⇒ 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:) ⇒ 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:) ⇒ <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
|
+
—
|
|
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<<span class='object_link'><a href=""
|
|
354
|
+
title="CSVDecision2::Index (class)">Index</a></span>></tt>)</span>
|
|
355
|
+
|
|
356
|
+
|
|
357
|
+
|
|
358
|
+
—
|
|
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
|
-
|
|
361
|
-
|
|
362
|
-
|
|
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
|
-
|
|
373
|
-
|
|
374
|
-
</table>
|
|
375
|
-
</div>
|
|
376
|
-
|
|
377
|
-
</div>
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
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> ⇒ <tt>Array<Integer></tt> <span class="extras">(readonly)</span>
|
|
411
|
+
|
|
401
412
|
|
|
402
413
|
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
<
|
|
408
|
-
<
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
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<Integer></tt>)</span>
|
|
438
|
+
|
|
439
|
+
|
|
440
|
+
|
|
441
|
+
—
|
|
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
|
-
|
|
436
|
-
|
|
437
|
-
|
|
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
|
-
|
|
443
|
-
|
|
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> ⇒ <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
|
-
|
|
470
|
-
|
|
471
|
-
<
|
|
472
|
-
|
|
473
|
-
<
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
</
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
473
|
+
<span id=""></span>
|
|
474
|
+
<div class="method_details ">
|
|
475
|
+
<h3 class="signature " id="hash-instance_method">
|
|
476
|
+
|
|
477
|
+
#<strong>hash</strong> ⇒ <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
|
+
—
|
|
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
|
-
|
|
503
|
-
|
|
504
|
-
|
|
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
|
-
|
|
510
|
-
|
|
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
|
-
|
|
522
|
-
<h3 class="signature first" id="build-class_method">
|
|
523
|
-
|
|
524
|
-
.<strong>build</strong>(table:) ⇒ <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
|
-
|
|
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
|
-
|
|
551
|
+
.<strong>build</strong>(table:) ⇒ <tt><span class='object_link'><a href=""
|
|
552
|
+
title="CSVDecision2::Index (class)">CSVDecision2::Index</a></span></tt>
|
|
538
553
|
|
|
539
554
|
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
<
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
<p>
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
</
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
<
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
</
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
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
|
+
—
|
|
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
|
+
—
|
|
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
|
-
|
|
602
|
-
|
|
603
|
-
|
|
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="
|
|
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
|
-
|
|
618
|
-
|
|
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) ⇒ <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
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
</div>
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
<
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
<
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
</
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
657
|
+
.<strong>value</strong>(current_value, index) ⇒ <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
|
+
—
|
|
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
|
+
—
|
|
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
|
+
—
|
|
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
|
-
|
|
714
|
-
|
|
715
|
-
|
|
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
|
-
|
|
725
|
-
|
|
726
|
-
</table>
|
|
727
|
-
</div>
|
|
728
|
-
|
|
729
|
-
</div>
|
|
758
|
+
</td>
|
|
759
|
+
</tr>
|
|
760
|
+
</table>
|
|
761
|
+
</div>
|
|
730
762
|
|
|
731
|
-
</div>
|
|
763
|
+
</div>
|
|
732
764
|
|
|
733
|
-
|
|
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
|
-
|
|
741
|
-
</
|
|
772
|
+
|
|
773
|
+
</div>
|
|
774
|
+
</body>
|
|
775
|
+
|
|
776
|
+
</html>
|