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
|
@@ -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
|
+
Module: CSVDecision2::Dictionary
|
|
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::Dictionary";
|
|
20
|
+
relpath = '../';
|
|
21
|
+
</script>
|
|
21
22
|
|
|
22
23
|
|
|
23
24
|
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
|
@@ -25,261 +26,275 @@
|
|
|
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 (D)</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">Dictionary</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
|
-
</div>
|
|
59
|
-
<div class="clear"></div>
|
|
64
|
+
<div id="content">
|
|
65
|
+
<h1>Module: CSVDecision2::Dictionary
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
<span class="private note title">Private</span>
|
|
69
|
+
</h1>
|
|
70
|
+
<div class="box_info">
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
<dl>
|
|
83
|
+
<dt>Defined in:</dt>
|
|
84
|
+
<dd>lib/csv_decision2/dictionary.rb</dd>
|
|
85
|
+
</dl>
|
|
86
|
+
|
|
60
87
|
</div>
|
|
61
88
|
|
|
62
|
-
<
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
<dl>
|
|
80
|
-
<dt>Defined in:</dt>
|
|
81
|
-
<dd>lib/csv_decision/dictionary.rb</dd>
|
|
82
|
-
</dl>
|
|
83
|
-
|
|
84
|
-
</div>
|
|
85
|
-
|
|
86
|
-
<h2>Overview</h2><div class="docstring">
|
|
87
|
-
<div class="discussion">
|
|
88
|
-
<p class="note private">
|
|
89
|
-
<strong>This module is part of a private API.</strong>
|
|
90
|
-
You should avoid using this module if possible, as it may be removed or be changed in the future.
|
|
91
|
-
</p>
|
|
92
|
-
|
|
93
|
-
<p>Parse the CSV file's header row. These methods are only required at
|
|
94
|
-
table load time.</p>
|
|
89
|
+
<h2>Overview</h2>
|
|
90
|
+
<div class="docstring">
|
|
91
|
+
<div class="discussion">
|
|
92
|
+
<p class="note private">
|
|
93
|
+
<strong>This module is part of a private API.</strong>
|
|
94
|
+
You should avoid using this module if possible, as it may be removed or be changed in the future.
|
|
95
|
+
</p>
|
|
95
96
|
|
|
97
|
+
<p>Parse the CSV file's header row. These methods are only required at
|
|
98
|
+
table load time.</p>
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
</div>
|
|
102
|
+
</div>
|
|
103
|
+
<div class="tags">
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
</div>
|
|
107
|
+
<h2>Defined Under Namespace</h2>
|
|
108
|
+
<p class="children">
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
<strong class="classes">Classes:</strong> <span class='object_link'><a href="Dictionary/Entry.html"
|
|
114
|
+
title="CSVDecision2::Dictionary::Entry (class)">Entry</a></span>
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
</p>
|
|
96
118
|
|
|
97
|
-
</div>
|
|
98
|
-
</div>
|
|
99
|
-
<div class="tags">
|
|
100
|
-
|
|
101
119
|
|
|
102
|
-
</div><h2>Defined Under Namespace</h2>
|
|
103
|
-
<p class="children">
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
<strong class="classes">Classes:</strong> <span class='object_link'><a href="Dictionary/Entry.html" title="CSVDecision::Dictionary::Entry (class)">Entry</a></span>
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
</p>
|
|
112
120
|
|
|
113
121
|
|
|
114
122
|
|
|
115
123
|
|
|
116
124
|
|
|
117
125
|
|
|
126
|
+
<h2>
|
|
127
|
+
Class Method Summary
|
|
128
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
|
129
|
+
</h2>
|
|
118
130
|
|
|
119
|
-
|
|
120
|
-
<h2>
|
|
121
|
-
Class Method Summary
|
|
122
|
-
<small><a href="#" class="summary_toggle">collapse</a></small>
|
|
123
|
-
</h2>
|
|
131
|
+
<ul class="summary">
|
|
124
132
|
|
|
125
|
-
<ul class="summary">
|
|
126
|
-
|
|
127
133
|
<li class="public ">
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
<
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
</
|
|
149
|
-
|
|
150
|
-
|
|
134
|
+
<span class="summary_signature">
|
|
135
|
+
|
|
136
|
+
<a href="#add_name-class_method" title="add_name (class method)">.<strong>add_name</strong>(columns:, name:,
|
|
137
|
+
out: false) ⇒ Hash{Symbol=>[:in, Integer]} </a>
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
</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>Add a new symbol to the dictionary of named input and output columns.</p>
|
|
154
|
+
</div>
|
|
155
|
+
</span>
|
|
156
|
+
|
|
157
|
+
</li>
|
|
158
|
+
|
|
159
|
+
|
|
151
160
|
<li class="public ">
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
<
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
</
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
</h3><div class="docstring">
|
|
195
|
-
<div class="discussion">
|
|
196
|
-
<p class="note private">
|
|
197
|
-
<strong>This method is part of a private API.</strong>
|
|
198
|
-
You should avoid using this method if possible, as it may be removed or be changed in the future.
|
|
199
|
-
</p>
|
|
200
|
-
|
|
201
|
-
<p>Add a new symbol to the dictionary of named input and output columns.</p>
|
|
161
|
+
<span class="summary_signature">
|
|
162
|
+
|
|
163
|
+
<a href="#build-class_method" title="build (class method)">.<strong>build</strong>(header:, dictionary:)
|
|
164
|
+
⇒ Columns::Dictionary </a>
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
</span>
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
<span class="private note title">private</span>
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
<span class="summary_desc">
|
|
179
|
+
<div class='inline'>
|
|
180
|
+
<p>Classify and build a dictionary of all input and output columns by parsing
|
|
181
|
+
the header row.</p>
|
|
182
|
+
</div>
|
|
183
|
+
</span>
|
|
184
|
+
|
|
185
|
+
</li>
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
</ul>
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
<div id="class_method_details" class="method_details_list">
|
|
194
|
+
<h2>Class Method Details</h2>
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
<div class="method_details first">
|
|
198
|
+
<h3 class="signature first" id="add_name-class_method">
|
|
199
|
+
|
|
200
|
+
.<strong>add_name</strong>(columns:, name:, out: false) ⇒ <tt>Hash{Symbol=>[:in, Integer]}</tt>
|
|
201
|
+
|
|
202
|
+
|
|
202
203
|
|
|
203
204
|
|
|
204
|
-
|
|
205
|
-
</
|
|
206
|
-
<div class="
|
|
207
|
-
|
|
208
|
-
<
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
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
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
205
|
+
|
|
206
|
+
</h3>
|
|
207
|
+
<div class="docstring">
|
|
208
|
+
<div class="discussion">
|
|
209
|
+
<p class="note private">
|
|
210
|
+
<strong>This method is part of a private API.</strong>
|
|
211
|
+
You should avoid using this method if possible, as it may be removed or be changed in the future.
|
|
212
|
+
</p>
|
|
213
|
+
|
|
214
|
+
<p>Add a new symbol to the dictionary of named input and output columns.</p>
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
</div>
|
|
218
|
+
</div>
|
|
219
|
+
<div class="tags">
|
|
220
|
+
<p class="tag_title">Parameters:</p>
|
|
221
|
+
<ul class="param">
|
|
222
|
+
|
|
223
|
+
<li>
|
|
224
|
+
|
|
225
|
+
<span class='name'>columns</span>
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
<span class='type'>(<tt>{Symbol=>Symbol}</tt>)</span>
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
—
|
|
233
|
+
<div class='inline'>
|
|
234
|
+
<p>Hash of column names with key values :in or :out.</p>
|
|
235
|
+
</div>
|
|
236
|
+
|
|
237
|
+
</li>
|
|
238
|
+
|
|
239
|
+
<li>
|
|
240
|
+
|
|
241
|
+
<span class='name'>name</span>
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
<span class='type'>(<tt>Symbol</tt>)</span>
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
—
|
|
249
|
+
<div class='inline'>
|
|
250
|
+
<p>Symbolized column name.</p>
|
|
251
|
+
</div>
|
|
252
|
+
|
|
253
|
+
</li>
|
|
254
|
+
|
|
255
|
+
<li>
|
|
256
|
+
|
|
257
|
+
<span class='name'>out</span>
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
<span class='type'>(<tt>false</tt>, <tt><span class='object_link'><a href="Index.html"
|
|
261
|
+
title="CSVDecision2::Index (class)">Index</a></span></tt>)</span>
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
—
|
|
266
|
+
<div class='inline'>
|
|
267
|
+
<p>False if an input column, otherwise the index of the output column.</p>
|
|
268
|
+
</div>
|
|
269
|
+
|
|
270
|
+
</li>
|
|
271
|
+
|
|
272
|
+
</ul>
|
|
273
|
+
|
|
274
|
+
<p class="tag_title">Returns:</p>
|
|
275
|
+
<ul class="return">
|
|
276
|
+
|
|
277
|
+
<li>
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
<span class='type'>(<tt>Hash{Symbol=>[:in, Integer]}</tt>)</span>
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
—
|
|
285
|
+
<div class='inline'>
|
|
286
|
+
<p>Column dictionary updated with the new name.</p>
|
|
287
|
+
</div>
|
|
288
|
+
|
|
289
|
+
</li>
|
|
290
|
+
|
|
291
|
+
</ul>
|
|
292
|
+
|
|
293
|
+
</div>
|
|
294
|
+
<table class="source_code">
|
|
295
|
+
<tr>
|
|
296
|
+
<td>
|
|
297
|
+
<pre class="lines">
|
|
283
298
|
|
|
284
299
|
|
|
285
300
|
17
|
|
@@ -288,104 +303,110 @@ the header row.</p>
|
|
|
288
303
|
20
|
|
289
304
|
21
|
|
290
305
|
22</pre>
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
306
|
+
</td>
|
|
307
|
+
<td>
|
|
308
|
+
<pre class="code"><span class="info file"># File 'lib/csv_decision2/dictionary.rb', line 17</span>
|
|
294
309
|
|
|
295
310
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_add_name'>add_name</span><span class='lparen'>(</span><span class='label'>columns:</span><span class='comma'>,</span> <span class='label'>name:</span><span class='comma'>,</span> <span class='label'>out:</span> <span class='kw'>false</span><span class='rparen'>)</span>
|
|
296
|
-
<span class='const'><span class='object_link'><a href="Validate.html" title="
|
|
311
|
+
<span class='const'><span class='object_link'><a href="Validate.html" title="CSVDecision2::Validate (module)">Validate</a></span></span><span class='period'>.</span><span class='id identifier rubyid_name'><span class='object_link'><a href="Validate.html#name-class_method" title="CSVDecision2::Validate.name (method)">name</a></span></span><span class='lparen'>(</span><span class='label'>columns:</span> <span class='id identifier rubyid_columns'>columns</span><span class='comma'>,</span> <span class='label'>name:</span> <span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='label'>out:</span> <span class='id identifier rubyid_out'>out</span><span class='rparen'>)</span>
|
|
297
312
|
|
|
298
313
|
<span class='id identifier rubyid_columns'>columns</span><span class='lbracket'>[</span><span class='id identifier rubyid_name'>name</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_out'>out</span> <span class='op'>?</span> <span class='id identifier rubyid_out'>out</span> <span class='op'>:</span> <span class='symbol'>:in</span>
|
|
299
314
|
<span class='id identifier rubyid_columns'>columns</span>
|
|
300
315
|
<span class='kw'>end</span></pre>
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
</table>
|
|
304
|
-
</div>
|
|
305
|
-
|
|
306
|
-
<div class="method_details ">
|
|
307
|
-
<h3 class="signature " id="build-class_method">
|
|
308
|
-
|
|
309
|
-
.<strong>build</strong>(header:, dictionary:) ⇒ <tt><span class='object_link'><a href="Columns/Dictionary.html" title="CSVDecision::Columns::Dictionary (class)">Columns::Dictionary</a></span></tt>
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
</h3><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>Classify and build a dictionary of all input and output columns by parsing
|
|
323
|
-
the header row.</p>
|
|
316
|
+
</td>
|
|
317
|
+
</tr>
|
|
318
|
+
</table>
|
|
319
|
+
</div>
|
|
324
320
|
|
|
321
|
+
<div class="method_details ">
|
|
322
|
+
<h3 class="signature " id="build-class_method">
|
|
323
|
+
|
|
324
|
+
.<strong>build</strong>(header:, dictionary:) ⇒ <tt><span class='object_link'><a
|
|
325
|
+
href="Columns/Dictionary.html"
|
|
326
|
+
title="CSVDecision2::Columns::Dictionary (class)">Columns::Dictionary</a></span></tt>
|
|
325
327
|
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
<p>
|
|
360
|
-
</div>
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
<
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
</
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
</h3>
|
|
333
|
+
<div class="docstring">
|
|
334
|
+
<div class="discussion">
|
|
335
|
+
<p class="note private">
|
|
336
|
+
<strong>This method is part of a private API.</strong>
|
|
337
|
+
You should avoid using this method if possible, as it may be removed or be changed in the future.
|
|
338
|
+
</p>
|
|
339
|
+
|
|
340
|
+
<p>Classify and build a dictionary of all input and output columns by parsing
|
|
341
|
+
the header row.</p>
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
</div>
|
|
345
|
+
</div>
|
|
346
|
+
<div class="tags">
|
|
347
|
+
<p class="tag_title">Parameters:</p>
|
|
348
|
+
<ul class="param">
|
|
349
|
+
|
|
350
|
+
<li>
|
|
351
|
+
|
|
352
|
+
<span class='name'>header</span>
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
<span class='type'>(<tt>Array<String></tt>)</span>
|
|
356
|
+
|
|
357
|
+
|
|
358
|
+
|
|
359
|
+
—
|
|
360
|
+
<div class='inline'>
|
|
361
|
+
<p>The header row after removing any empty columns.</p>
|
|
362
|
+
</div>
|
|
363
|
+
|
|
364
|
+
</li>
|
|
365
|
+
|
|
366
|
+
<li>
|
|
367
|
+
|
|
368
|
+
<span class='name'>dictionary</span>
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
<span class='type'>(<tt><span class='object_link'><a href="Columns/Dictionary.html"
|
|
372
|
+
title="CSVDecision2::Columns::Dictionary (class)">Columns::Dictionary</a></span></tt>)</span>
|
|
373
|
+
|
|
374
|
+
|
|
375
|
+
|
|
376
|
+
—
|
|
377
|
+
<div class='inline'>
|
|
378
|
+
<p>Table's columns dictionary.</p>
|
|
379
|
+
</div>
|
|
380
|
+
|
|
381
|
+
</li>
|
|
382
|
+
|
|
383
|
+
</ul>
|
|
384
|
+
|
|
385
|
+
<p class="tag_title">Returns:</p>
|
|
386
|
+
<ul class="return">
|
|
387
|
+
|
|
388
|
+
<li>
|
|
389
|
+
|
|
390
|
+
|
|
391
|
+
<span class='type'>(<tt><span class='object_link'><a href="Columns/Dictionary.html"
|
|
392
|
+
title="CSVDecision2::Columns::Dictionary (class)">Columns::Dictionary</a></span></tt>)</span>
|
|
393
|
+
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
—
|
|
397
|
+
<div class='inline'>
|
|
398
|
+
<p>Table's columns dictionary.</p>
|
|
399
|
+
</div>
|
|
400
|
+
|
|
401
|
+
</li>
|
|
402
|
+
|
|
403
|
+
</ul>
|
|
404
|
+
|
|
405
|
+
</div>
|
|
406
|
+
<table class="source_code">
|
|
407
|
+
<tr>
|
|
408
|
+
<td>
|
|
409
|
+
<pre class="lines">
|
|
389
410
|
|
|
390
411
|
|
|
391
412
|
121
|
|
@@ -395,9 +416,9 @@ the header row.</p>
|
|
|
395
416
|
125
|
|
396
417
|
126
|
|
397
418
|
127</pre>
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
419
|
+
</td>
|
|
420
|
+
<td>
|
|
421
|
+
<pre class="code"><span class="info file"># File 'lib/csv_decision2/dictionary.rb', line 121</span>
|
|
401
422
|
|
|
402
423
|
<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'>header:</span><span class='comma'>,</span> <span class='label'>dictionary:</span><span class='rparen'>)</span>
|
|
403
424
|
<span class='id identifier rubyid_header'>header</span><span class='period'>.</span><span class='id identifier rubyid_each_with_index'>each_with_index</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_cell'>cell</span><span class='comma'>,</span> <span class='id identifier rubyid_index'>index</span><span class='op'>|</span>
|
|
@@ -406,21 +427,22 @@ the header row.</p>
|
|
|
406
427
|
|
|
407
428
|
<span class='id identifier rubyid_dictionary'>dictionary</span>
|
|
408
429
|
<span class='kw'>end</span></pre>
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
</table>
|
|
412
|
-
</div>
|
|
413
|
-
|
|
414
|
-
</div>
|
|
430
|
+
</td>
|
|
431
|
+
</tr>
|
|
432
|
+
</table>
|
|
433
|
+
</div>
|
|
415
434
|
|
|
416
|
-
</div>
|
|
435
|
+
</div>
|
|
417
436
|
|
|
418
|
-
|
|
419
|
-
Generated on Sun Feb 11 10:26:07 2018 by
|
|
420
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
421
|
-
0.9.12 (ruby-2.4.0).
|
|
422
|
-
</div>
|
|
437
|
+
</div>
|
|
423
438
|
|
|
439
|
+
<div id="footer">
|
|
440
|
+
Generated on Sun Feb 11 10:26:07 2018 by
|
|
441
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
442
|
+
0.9.12 (ruby-2.4.0).
|
|
424
443
|
</div>
|
|
425
|
-
|
|
426
|
-
</
|
|
444
|
+
|
|
445
|
+
</div>
|
|
446
|
+
</body>
|
|
447
|
+
|
|
448
|
+
</html>
|