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/Load.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
|
+
Module: CSVDecision2::Load
|
|
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::Load";
|
|
20
|
+
relpath = '../';
|
|
21
|
+
</script>
|
|
21
22
|
|
|
22
23
|
|
|
23
24
|
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
|
@@ -25,227 +26,237 @@
|
|
|
25
26
|
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
|
26
27
|
|
|
27
28
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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 (L)</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">Load</span>
|
|
34
46
|
|
|
35
|
-
<div id="main" tabindex="-1">
|
|
36
|
-
<div id="header">
|
|
37
|
-
<div id="menu">
|
|
38
|
-
|
|
39
|
-
<a href="../_index.html">Index (L)</a> »
|
|
40
|
-
<span class='title'><span class='object_link'><a href="../CSVDecision.html" title="CSVDecision (module)">CSVDecision</a></span></span>
|
|
41
|
-
»
|
|
42
|
-
<span class="title">Load</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>
|
|
60
47
|
</div>
|
|
61
48
|
|
|
62
|
-
<div id="
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
<span class="private note title">Private</span>
|
|
66
|
-
</h1>
|
|
67
|
-
<div class="box_info">
|
|
68
|
-
|
|
49
|
+
<div id="search">
|
|
50
|
+
|
|
51
|
+
<a class="full_list_link" id="class_list_link" href="../class_list.html">
|
|
69
52
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
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>
|
|
75
59
|
|
|
76
|
-
|
|
60
|
+
</div>
|
|
61
|
+
<div class="clear"></div>
|
|
62
|
+
</div>
|
|
77
63
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
<dt>Defined in:</dt>
|
|
81
|
-
<dd>lib/csv_decision/load.rb</dd>
|
|
82
|
-
</dl>
|
|
83
|
-
|
|
84
|
-
</div>
|
|
64
|
+
<div id="content">
|
|
65
|
+
<h1>Module: CSVDecision2::Load
|
|
85
66
|
|
|
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
67
|
|
|
93
|
-
<
|
|
68
|
+
<span class="private note title">Private</span>
|
|
69
|
+
</h1>
|
|
70
|
+
<div class="box_info">
|
|
94
71
|
|
|
95
72
|
|
|
96
|
-
</div>
|
|
97
|
-
</div>
|
|
98
|
-
<div class="tags">
|
|
99
|
-
|
|
100
73
|
|
|
101
|
-
</div>
|
|
102
74
|
|
|
103
75
|
|
|
104
76
|
|
|
105
77
|
|
|
106
78
|
|
|
107
79
|
|
|
108
|
-
|
|
109
|
-
<h2>
|
|
110
|
-
Class Method Summary
|
|
111
|
-
<small><a href="#" class="summary_toggle">collapse</a></small>
|
|
112
|
-
</h2>
|
|
113
80
|
|
|
114
|
-
|
|
115
|
-
|
|
81
|
+
|
|
82
|
+
<dl>
|
|
83
|
+
<dt>Defined in:</dt>
|
|
84
|
+
<dd>lib/csv_decision2/load.rb</dd>
|
|
85
|
+
</dl>
|
|
86
|
+
|
|
87
|
+
</div>
|
|
88
|
+
|
|
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>
|
|
96
|
+
|
|
97
|
+
<p>Load all CSV files located in the specified folder.</p>
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
</div>
|
|
101
|
+
</div>
|
|
102
|
+
<div class="tags">
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
</div>
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
<h2>
|
|
114
|
+
Class Method Summary
|
|
115
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
|
116
|
+
</h2>
|
|
117
|
+
|
|
118
|
+
<ul class="summary">
|
|
119
|
+
|
|
116
120
|
<li class="public ">
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
<a href="#path-class_method" title="path (class method)">.<strong>path</strong>(path:, options:) ⇒ Hash{Symbol=><CSVDecision::Table>} </a>
|
|
120
|
-
|
|
121
|
+
<span class="summary_signature">
|
|
121
122
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
<span class="private note title">private</span>
|
|
123
|
+
<a href="#path-class_method" title="path (class method)">.<strong>path</strong>(path:, options:) ⇒
|
|
124
|
+
Hash{Symbol=><CSVDecision2::Table>} </a>
|
|
131
125
|
|
|
132
|
-
|
|
133
|
-
<span class="summary_desc"><div class='inline'>
|
|
134
|
-
<p>Load all the CSV files located in the designated folder path.</p>
|
|
135
|
-
</div></span>
|
|
136
|
-
|
|
137
|
-
</li>
|
|
138
126
|
|
|
139
|
-
|
|
140
|
-
</ul>
|
|
141
|
-
|
|
142
127
|
|
|
128
|
+
</span>
|
|
143
129
|
|
|
144
130
|
|
|
145
|
-
<div id="class_method_details" class="method_details_list">
|
|
146
|
-
<h2>Class Method Details</h2>
|
|
147
131
|
|
|
148
|
-
|
|
149
|
-
<div class="method_details first">
|
|
150
|
-
<h3 class="signature first" id="path-class_method">
|
|
151
|
-
|
|
152
|
-
.<strong>path</strong>(path:, options:) ⇒ <tt>Hash{Symbol=><<span class='object_link'><a href="Table.html" title="CSVDecision::Table (class)">CSVDecision::Table</a></span>>}</tt>
|
|
153
|
-
|
|
154
132
|
|
|
155
|
-
|
|
156
133
|
|
|
157
|
-
|
|
158
|
-
</h3><div class="docstring">
|
|
159
|
-
<div class="discussion">
|
|
160
|
-
<p class="note private">
|
|
161
|
-
<strong>This method is part of a private API.</strong>
|
|
162
|
-
You should avoid using this method if possible, as it may be removed or be changed in the future.
|
|
163
|
-
</p>
|
|
164
134
|
|
|
165
|
-
<
|
|
135
|
+
<span class="private note title">private</span>
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
<span class="summary_desc">
|
|
139
|
+
<div class='inline'>
|
|
140
|
+
<p>Load all the CSV files located in the designated folder path.</p>
|
|
141
|
+
</div>
|
|
142
|
+
</span>
|
|
143
|
+
|
|
144
|
+
</li>
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
</ul>
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
<div id="class_method_details" class="method_details_list">
|
|
153
|
+
<h2>Class Method Details</h2>
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
<div class="method_details first">
|
|
157
|
+
<h3 class="signature first" id="path-class_method">
|
|
158
|
+
|
|
159
|
+
.<strong>path</strong>(path:, options:) ⇒ <tt>Hash{Symbol=><<span class='object_link'><a
|
|
160
|
+
href="Table.html" title="CSVDecision2::Table (class)">CSVDecision2::Table</a></span>>}</tt>
|
|
161
|
+
|
|
166
162
|
|
|
167
163
|
|
|
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
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
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
|
-
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
</h3>
|
|
167
|
+
<div class="docstring">
|
|
168
|
+
<div class="discussion">
|
|
169
|
+
<p class="note private">
|
|
170
|
+
<strong>This method is part of a private API.</strong>
|
|
171
|
+
You should avoid using this method if possible, as it may be removed or be changed in the future.
|
|
172
|
+
</p>
|
|
173
|
+
|
|
174
|
+
<p>Load all the CSV files located in the designated folder path.</p>
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
</div>
|
|
178
|
+
</div>
|
|
179
|
+
<div class="tags">
|
|
180
|
+
<p class="tag_title">Parameters:</p>
|
|
181
|
+
<ul class="param">
|
|
182
|
+
|
|
183
|
+
<li>
|
|
184
|
+
|
|
185
|
+
<span class='name'>path</span>
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
<span class='type'>(<tt>Pathname</tt>)</span>
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
—
|
|
193
|
+
<div class='inline'>
|
|
194
|
+
<p>Directory containing CSV decision table files.</p>
|
|
195
|
+
</div>
|
|
196
|
+
|
|
197
|
+
</li>
|
|
198
|
+
|
|
199
|
+
<li>
|
|
200
|
+
|
|
201
|
+
<span class='name'>options</span>
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
<span class='type'>(<tt>Hash{Symbol=>Object}</tt>)</span>
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
—
|
|
209
|
+
<div class='inline'>
|
|
210
|
+
<p>Options hash controlling how the table is parsed and interpreted.</p>
|
|
211
|
+
</div>
|
|
212
|
+
|
|
213
|
+
</li>
|
|
214
|
+
|
|
215
|
+
</ul>
|
|
216
|
+
|
|
217
|
+
<p class="tag_title">Returns:</p>
|
|
218
|
+
<ul class="return">
|
|
219
|
+
|
|
220
|
+
<li>
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
<span class='type'>(<tt>Hash{Symbol=><<span class='object_link'><a href="Table.html"
|
|
224
|
+
title="CSVDecision2::Table (class)">CSVDecision2::Table</a></span>>}</tt>)</span>
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
—
|
|
229
|
+
<div class='inline'>
|
|
230
|
+
<p>Hash of decision tables keyed by the CSV file's symbolized base name.</p>
|
|
231
|
+
</div>
|
|
232
|
+
|
|
233
|
+
</li>
|
|
234
|
+
|
|
235
|
+
</ul>
|
|
236
|
+
<p class="tag_title">Raises:</p>
|
|
237
|
+
<ul class="raise">
|
|
238
|
+
|
|
239
|
+
<li>
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
<span class='type'>(<tt>ArgumentError</tt>)</span>
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
—
|
|
247
|
+
<div class='inline'>
|
|
248
|
+
<p>Invalid path name or folder.</p>
|
|
249
|
+
</div>
|
|
250
|
+
|
|
251
|
+
</li>
|
|
252
|
+
|
|
253
|
+
</ul>
|
|
254
|
+
|
|
255
|
+
</div>
|
|
256
|
+
<table class="source_code">
|
|
257
|
+
<tr>
|
|
258
|
+
<td>
|
|
259
|
+
<pre class="lines">
|
|
249
260
|
|
|
250
261
|
|
|
251
262
|
23
|
|
@@ -260,9 +271,9 @@
|
|
|
260
271
|
32
|
|
261
272
|
33
|
|
262
273
|
34</pre>
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
274
|
+
</td>
|
|
275
|
+
<td>
|
|
276
|
+
<pre class="code"><span class="info file"># File 'lib/csv_decision2/load.rb', line 23</span>
|
|
266
277
|
|
|
267
278
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_path'>path</span><span class='lparen'>(</span><span class='label'>path:</span><span class='comma'>,</span> <span class='label'>options:</span><span class='rparen'>)</span>
|
|
268
279
|
<span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>path argument must be a Pathname</span><span class='tstring_end'>'</span></span> <span class='kw'>unless</span> <span class='id identifier rubyid_path'>path</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Pathname</span><span class='rparen'>)</span>
|
|
@@ -271,26 +282,27 @@
|
|
|
271
282
|
<span class='id identifier rubyid_tables'>tables</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
|
272
283
|
<span class='const'>Dir</span><span class='lbracket'>[</span><span class='id identifier rubyid_path'>path</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>*.csv</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_file_name'>file_name</span><span class='op'>|</span>
|
|
273
284
|
<span class='id identifier rubyid_table_name'>table_name</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_basename'>basename</span><span class='lparen'>(</span><span class='id identifier rubyid_file_name'>file_name</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>.csv</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span>
|
|
274
|
-
<span class='id identifier rubyid_tables'>tables</span><span class='lbracket'>[</span><span class='id identifier rubyid_table_name'>table_name</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../
|
|
285
|
+
<span class='id identifier rubyid_tables'>tables</span><span class='lbracket'>[</span><span class='id identifier rubyid_table_name'>table_name</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../CSVDecision2.html" title="CSVDecision (module)">CSVDecision</a></span></span><span class='period'>.</span><span class='id identifier rubyid_parse'><span class='object_link'><a href="../CSVDecision2.html#parse-class_method" title="CSVDecision2.parse (method)">parse</a></span></span><span class='lparen'>(</span><span class='const'>Pathname</span><span class='lparen'>(</span><span class='id identifier rubyid_file_name'>file_name</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
|
275
286
|
<span class='kw'>end</span>
|
|
276
287
|
|
|
277
288
|
<span class='id identifier rubyid_tables'>tables</span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span>
|
|
278
289
|
<span class='kw'>end</span></pre>
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
</table>
|
|
282
|
-
</div>
|
|
283
|
-
|
|
284
|
-
</div>
|
|
290
|
+
</td>
|
|
291
|
+
</tr>
|
|
292
|
+
</table>
|
|
293
|
+
</div>
|
|
285
294
|
|
|
286
|
-
</div>
|
|
295
|
+
</div>
|
|
287
296
|
|
|
288
|
-
|
|
289
|
-
Generated on Sun Feb 11 10:26:07 2018 by
|
|
290
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
291
|
-
0.9.12 (ruby-2.4.0).
|
|
292
|
-
</div>
|
|
297
|
+
</div>
|
|
293
298
|
|
|
299
|
+
<div id="footer">
|
|
300
|
+
Generated on Sun Feb 11 10:26:07 2018 by
|
|
301
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
302
|
+
0.9.12 (ruby-2.4.0).
|
|
294
303
|
</div>
|
|
295
|
-
|
|
296
|
-
</
|
|
304
|
+
|
|
305
|
+
</div>
|
|
306
|
+
</body>
|
|
307
|
+
|
|
308
|
+
</html>
|