csv2hash 0.6.2 → 0.6.3
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/.gitignore +2 -5
- data/.yardoc/checksums +25 -0
- data/.yardoc/object_types +0 -0
- data/.yardoc/objects/root.dat +0 -0
- data/.yardoc/proxy_types +0 -0
- data/CHANGELOG.md +8 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +15 -1
- data/README.md +32 -4
- data/UPGRADE.md +2 -0
- data/bin/generate_doc +3 -0
- data/config/example.csv +10 -0
- data/config/rules.yml +7 -0
- data/doc/Cell.html +282 -0
- data/doc/Csv2hash/Adapter/Abstract.html +215 -0
- data/doc/Csv2hash/Adapter/Base/UnsupportedAdapter.html +123 -0
- data/doc/Csv2hash/Adapter/Base.html +201 -0
- data/doc/Csv2hash/Adapter/CsvAdapter.html +348 -0
- data/doc/Csv2hash/Adapter/MemoryAdapter.html +348 -0
- data/doc/Csv2hash/Adapter.html +117 -0
- data/doc/Csv2hash/DataWrapper.html +500 -0
- data/doc/Csv2hash/Definition.html +1008 -0
- data/doc/Csv2hash/Discover.html +192 -0
- data/doc/Csv2hash/Expectation.html +202 -0
- data/doc/Csv2hash/ExtraValidator.html +207 -0
- data/doc/Csv2hash/Main.html +1298 -0
- data/doc/Csv2hash/Notifier.html +189 -0
- data/doc/Csv2hash/Parser/Collection.html +283 -0
- data/doc/Csv2hash/Parser/Mapping.html +266 -0
- data/doc/Csv2hash/Parser.html +121 -0
- data/doc/Csv2hash/StructureValidator/Deprecation.html +215 -0
- data/doc/Csv2hash/StructureValidator/MaxColumns.html +327 -0
- data/doc/Csv2hash/StructureValidator/MinColumns.html +327 -0
- data/doc/Csv2hash/StructureValidator/ValidationError.html +123 -0
- data/doc/Csv2hash/StructureValidator/Validator.html +184 -0
- data/doc/Csv2hash/StructureValidator.html +311 -0
- data/doc/Csv2hash/Validator/Collection.html +217 -0
- data/doc/Csv2hash/Validator/Mapping.html +200 -0
- data/doc/Csv2hash/Validator.html +295 -0
- data/doc/Csv2hash.html +131 -0
- data/doc/CsvArray.html +200 -0
- data/doc/Registry.html +312 -0
- data/doc/_index.html +391 -0
- data/doc/class_list.html +54 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +57 -0
- data/doc/css/style.css +339 -0
- data/doc/file.README.html +499 -0
- data/doc/file_list.html +56 -0
- data/doc/frames.html +26 -0
- data/doc/index.html +499 -0
- data/doc/js/app.js +219 -0
- data/doc/js/full_list.js +178 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +473 -0
- data/doc/top-level-namespace.html +114 -0
- data/lib/csv2hash/definition.rb +3 -3
- data/lib/csv2hash/version.rb +1 -1
- data/lib/csv2hash/yaml_loader.rb +33 -0
- data/lib/csv2hash.rb +28 -8
- data/spec/csv2hash/yaml_loader_spec.rb +20 -0
- data/spec/csv2hash_spec.rb +13 -10
- metadata +56 -1
@@ -0,0 +1,327 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
+
<title>
|
7
|
+
Class: Csv2hash::StructureValidator::MaxColumns
|
8
|
+
|
9
|
+
— Documentation by YARD 0.8.7.4
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
hasFrames = window.top.frames.main ? true : false;
|
19
|
+
relpath = '../../';
|
20
|
+
framesUrl = "../../frames.html#!Csv2hash/StructureValidator/MaxColumns.html";
|
21
|
+
</script>
|
22
|
+
|
23
|
+
|
24
|
+
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
|
25
|
+
|
26
|
+
<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
|
27
|
+
|
28
|
+
|
29
|
+
</head>
|
30
|
+
<body>
|
31
|
+
<div id="header">
|
32
|
+
<div id="menu">
|
33
|
+
|
34
|
+
<a href="../../_index.html">Index (M)</a> »
|
35
|
+
<span class='title'><span class='object_link'><a href="../../Csv2hash.html" title="Csv2hash (module)">Csv2hash</a></span></span> » <span class='title'><span class='object_link'><a href="../StructureValidator.html" title="Csv2hash::StructureValidator (module)">StructureValidator</a></span></span>
|
36
|
+
»
|
37
|
+
<span class="title">MaxColumns</span>
|
38
|
+
|
39
|
+
|
40
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
41
|
+
</div>
|
42
|
+
|
43
|
+
<div id="search">
|
44
|
+
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
46
|
+
href="../../class_list.html">
|
47
|
+
Class List
|
48
|
+
</a>
|
49
|
+
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
51
|
+
href="../../method_list.html">
|
52
|
+
Method List
|
53
|
+
</a>
|
54
|
+
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
56
|
+
href="../../file_list.html">
|
57
|
+
File List
|
58
|
+
</a>
|
59
|
+
|
60
|
+
</div>
|
61
|
+
<div class="clear"></div>
|
62
|
+
</div>
|
63
|
+
|
64
|
+
<iframe id="search_frame"></iframe>
|
65
|
+
|
66
|
+
<div id="content"><h1>Class: Csv2hash::StructureValidator::MaxColumns
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
</h1>
|
71
|
+
|
72
|
+
<dl class="box">
|
73
|
+
|
74
|
+
<dt class="r1">Inherits:</dt>
|
75
|
+
<dd class="r1">
|
76
|
+
<span class="inheritName">Object</span>
|
77
|
+
|
78
|
+
<ul class="fullTree">
|
79
|
+
<li>Object</li>
|
80
|
+
|
81
|
+
<li class="next">Csv2hash::StructureValidator::MaxColumns</li>
|
82
|
+
|
83
|
+
</ul>
|
84
|
+
<a href="#" class="inheritanceTree">show all</a>
|
85
|
+
|
86
|
+
</dd>
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
<dt class="r2">Includes:</dt>
|
94
|
+
<dd class="r2"><span class='object_link'><a href="Validator.html" title="Csv2hash::StructureValidator::Validator (module)">Validator</a></span></dd>
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
<dt class="r1 last">Defined in:</dt>
|
101
|
+
<dd class="r1 last">lib/csv2hash/structure_validator/max_columns.rb</dd>
|
102
|
+
|
103
|
+
</dl>
|
104
|
+
<div class="clear"></div>
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
<h2>
|
115
|
+
Instance Method Summary
|
116
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
117
|
+
</h2>
|
118
|
+
|
119
|
+
<ul class="summary">
|
120
|
+
|
121
|
+
<li class="public ">
|
122
|
+
<span class="summary_signature">
|
123
|
+
|
124
|
+
<a href="#error_message-instance_method" title="#error_message (instance method)">- (Object) <strong>error_message</strong>(line) </a>
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
</span>
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
139
|
+
|
140
|
+
</li>
|
141
|
+
|
142
|
+
|
143
|
+
<li class="public ">
|
144
|
+
<span class="summary_signature">
|
145
|
+
|
146
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (MaxColumns) <strong>initialize</strong>(max_size) </a>
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
</span>
|
151
|
+
|
152
|
+
|
153
|
+
<span class="note title constructor">constructor</span>
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
<span class="summary_desc"><div class='inline'>
|
163
|
+
<p>A new instance of MaxColumns.</p>
|
164
|
+
</div></span>
|
165
|
+
|
166
|
+
</li>
|
167
|
+
|
168
|
+
|
169
|
+
<li class="public ">
|
170
|
+
<span class="summary_signature">
|
171
|
+
|
172
|
+
<a href="#validate_line-instance_method" title="#validate_line (instance method)">- (Object) <strong>validate_line</strong>(line) </a>
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
</span>
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
187
|
+
|
188
|
+
</li>
|
189
|
+
|
190
|
+
|
191
|
+
</ul>
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
<h3 class="inherited">Methods included from <span class='object_link'><a href="Validator.html" title="Csv2hash::StructureValidator::Validator (module)">Validator</a></span></h3>
|
204
|
+
<p class="inherited"><span class='object_link'><a href="Validator.html#validate%21-instance_method" title="Csv2hash::StructureValidator::Validator#validate! (method)">#validate!</a></span></p>
|
205
|
+
<div id="constructor_details" class="method_details_list">
|
206
|
+
<h2>Constructor Details</h2>
|
207
|
+
|
208
|
+
<div class="method_details first">
|
209
|
+
<h3 class="signature first" id="initialize-instance_method">
|
210
|
+
|
211
|
+
- (<tt><span class='object_link'><a href="" title="Csv2hash::StructureValidator::MaxColumns (class)">MaxColumns</a></span></tt>) <strong>initialize</strong>(max_size)
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
</h3><div class="docstring">
|
218
|
+
<div class="discussion">
|
219
|
+
|
220
|
+
<p>Returns a new instance of MaxColumns</p>
|
221
|
+
|
222
|
+
|
223
|
+
</div>
|
224
|
+
</div>
|
225
|
+
<div class="tags">
|
226
|
+
|
227
|
+
|
228
|
+
</div><table class="source_code">
|
229
|
+
<tr>
|
230
|
+
<td>
|
231
|
+
<pre class="lines">
|
232
|
+
|
233
|
+
|
234
|
+
7
|
235
|
+
8
|
236
|
+
9</pre>
|
237
|
+
</td>
|
238
|
+
<td>
|
239
|
+
<pre class="code"><span class="info file"># File 'lib/csv2hash/structure_validator/max_columns.rb', line 7</span>
|
240
|
+
|
241
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span> <span class='id identifier rubyid_max_size'>max_size</span>
|
242
|
+
<span class='ivar'>@max_size</span> <span class='op'>=</span> <span class='id identifier rubyid_max_size'>max_size</span>
|
243
|
+
<span class='kw'>end</span></pre>
|
244
|
+
</td>
|
245
|
+
</tr>
|
246
|
+
</table>
|
247
|
+
</div>
|
248
|
+
|
249
|
+
</div>
|
250
|
+
|
251
|
+
|
252
|
+
<div id="instance_method_details" class="method_details_list">
|
253
|
+
<h2>Instance Method Details</h2>
|
254
|
+
|
255
|
+
|
256
|
+
<div class="method_details first">
|
257
|
+
<h3 class="signature first" id="error_message-instance_method">
|
258
|
+
|
259
|
+
- (<tt>Object</tt>) <strong>error_message</strong>(line)
|
260
|
+
|
261
|
+
|
262
|
+
|
263
|
+
|
264
|
+
|
265
|
+
</h3><table class="source_code">
|
266
|
+
<tr>
|
267
|
+
<td>
|
268
|
+
<pre class="lines">
|
269
|
+
|
270
|
+
|
271
|
+
15
|
272
|
+
16
|
273
|
+
17</pre>
|
274
|
+
</td>
|
275
|
+
<td>
|
276
|
+
<pre class="code"><span class="info file"># File 'lib/csv2hash/structure_validator/max_columns.rb', line 15</span>
|
277
|
+
|
278
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_error_message'>error_message</span> <span class='id identifier rubyid_line'>line</span>
|
279
|
+
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Too many columns (max. </span><span class='embexpr_beg'>#{</span><span class='ivar'>@max_size</span><span class='embexpr_end'>}</span><span class='tstring_content'>) on line </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_line'>line</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
280
|
+
<span class='kw'>end</span></pre>
|
281
|
+
</td>
|
282
|
+
</tr>
|
283
|
+
</table>
|
284
|
+
</div>
|
285
|
+
|
286
|
+
<div class="method_details ">
|
287
|
+
<h3 class="signature " id="validate_line-instance_method">
|
288
|
+
|
289
|
+
- (<tt>Object</tt>) <strong>validate_line</strong>(line)
|
290
|
+
|
291
|
+
|
292
|
+
|
293
|
+
|
294
|
+
|
295
|
+
</h3><table class="source_code">
|
296
|
+
<tr>
|
297
|
+
<td>
|
298
|
+
<pre class="lines">
|
299
|
+
|
300
|
+
|
301
|
+
11
|
302
|
+
12
|
303
|
+
13</pre>
|
304
|
+
</td>
|
305
|
+
<td>
|
306
|
+
<pre class="code"><span class="info file"># File 'lib/csv2hash/structure_validator/max_columns.rb', line 11</span>
|
307
|
+
|
308
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_validate_line'>validate_line</span> <span class='id identifier rubyid_line'>line</span>
|
309
|
+
<span class='id identifier rubyid_line'>line</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='op'>></span> <span class='ivar'>@max_size</span>
|
310
|
+
<span class='kw'>end</span></pre>
|
311
|
+
</td>
|
312
|
+
</tr>
|
313
|
+
</table>
|
314
|
+
</div>
|
315
|
+
|
316
|
+
</div>
|
317
|
+
|
318
|
+
</div>
|
319
|
+
|
320
|
+
<div id="footer">
|
321
|
+
Generated on Fri Aug 29 17:12:27 2014 by
|
322
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
323
|
+
0.8.7.4 (ruby-2.1.2).
|
324
|
+
</div>
|
325
|
+
|
326
|
+
</body>
|
327
|
+
</html>
|
@@ -0,0 +1,327 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
+
<title>
|
7
|
+
Class: Csv2hash::StructureValidator::MinColumns
|
8
|
+
|
9
|
+
— Documentation by YARD 0.8.7.4
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
hasFrames = window.top.frames.main ? true : false;
|
19
|
+
relpath = '../../';
|
20
|
+
framesUrl = "../../frames.html#!Csv2hash/StructureValidator/MinColumns.html";
|
21
|
+
</script>
|
22
|
+
|
23
|
+
|
24
|
+
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
|
25
|
+
|
26
|
+
<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
|
27
|
+
|
28
|
+
|
29
|
+
</head>
|
30
|
+
<body>
|
31
|
+
<div id="header">
|
32
|
+
<div id="menu">
|
33
|
+
|
34
|
+
<a href="../../_index.html">Index (M)</a> »
|
35
|
+
<span class='title'><span class='object_link'><a href="../../Csv2hash.html" title="Csv2hash (module)">Csv2hash</a></span></span> » <span class='title'><span class='object_link'><a href="../StructureValidator.html" title="Csv2hash::StructureValidator (module)">StructureValidator</a></span></span>
|
36
|
+
»
|
37
|
+
<span class="title">MinColumns</span>
|
38
|
+
|
39
|
+
|
40
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
41
|
+
</div>
|
42
|
+
|
43
|
+
<div id="search">
|
44
|
+
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
46
|
+
href="../../class_list.html">
|
47
|
+
Class List
|
48
|
+
</a>
|
49
|
+
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
51
|
+
href="../../method_list.html">
|
52
|
+
Method List
|
53
|
+
</a>
|
54
|
+
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
56
|
+
href="../../file_list.html">
|
57
|
+
File List
|
58
|
+
</a>
|
59
|
+
|
60
|
+
</div>
|
61
|
+
<div class="clear"></div>
|
62
|
+
</div>
|
63
|
+
|
64
|
+
<iframe id="search_frame"></iframe>
|
65
|
+
|
66
|
+
<div id="content"><h1>Class: Csv2hash::StructureValidator::MinColumns
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
</h1>
|
71
|
+
|
72
|
+
<dl class="box">
|
73
|
+
|
74
|
+
<dt class="r1">Inherits:</dt>
|
75
|
+
<dd class="r1">
|
76
|
+
<span class="inheritName">Object</span>
|
77
|
+
|
78
|
+
<ul class="fullTree">
|
79
|
+
<li>Object</li>
|
80
|
+
|
81
|
+
<li class="next">Csv2hash::StructureValidator::MinColumns</li>
|
82
|
+
|
83
|
+
</ul>
|
84
|
+
<a href="#" class="inheritanceTree">show all</a>
|
85
|
+
|
86
|
+
</dd>
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
<dt class="r2">Includes:</dt>
|
94
|
+
<dd class="r2"><span class='object_link'><a href="Validator.html" title="Csv2hash::StructureValidator::Validator (module)">Validator</a></span></dd>
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
<dt class="r1 last">Defined in:</dt>
|
101
|
+
<dd class="r1 last">lib/csv2hash/structure_validator/min_columns.rb</dd>
|
102
|
+
|
103
|
+
</dl>
|
104
|
+
<div class="clear"></div>
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
<h2>
|
115
|
+
Instance Method Summary
|
116
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
117
|
+
</h2>
|
118
|
+
|
119
|
+
<ul class="summary">
|
120
|
+
|
121
|
+
<li class="public ">
|
122
|
+
<span class="summary_signature">
|
123
|
+
|
124
|
+
<a href="#error_message-instance_method" title="#error_message (instance method)">- (Object) <strong>error_message</strong>(line) </a>
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
</span>
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
139
|
+
|
140
|
+
</li>
|
141
|
+
|
142
|
+
|
143
|
+
<li class="public ">
|
144
|
+
<span class="summary_signature">
|
145
|
+
|
146
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (MinColumns) <strong>initialize</strong>(min_size) </a>
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
</span>
|
151
|
+
|
152
|
+
|
153
|
+
<span class="note title constructor">constructor</span>
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
<span class="summary_desc"><div class='inline'>
|
163
|
+
<p>A new instance of MinColumns.</p>
|
164
|
+
</div></span>
|
165
|
+
|
166
|
+
</li>
|
167
|
+
|
168
|
+
|
169
|
+
<li class="public ">
|
170
|
+
<span class="summary_signature">
|
171
|
+
|
172
|
+
<a href="#validate_line-instance_method" title="#validate_line (instance method)">- (Object) <strong>validate_line</strong>(line) </a>
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
</span>
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
187
|
+
|
188
|
+
</li>
|
189
|
+
|
190
|
+
|
191
|
+
</ul>
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
<h3 class="inherited">Methods included from <span class='object_link'><a href="Validator.html" title="Csv2hash::StructureValidator::Validator (module)">Validator</a></span></h3>
|
204
|
+
<p class="inherited"><span class='object_link'><a href="Validator.html#validate%21-instance_method" title="Csv2hash::StructureValidator::Validator#validate! (method)">#validate!</a></span></p>
|
205
|
+
<div id="constructor_details" class="method_details_list">
|
206
|
+
<h2>Constructor Details</h2>
|
207
|
+
|
208
|
+
<div class="method_details first">
|
209
|
+
<h3 class="signature first" id="initialize-instance_method">
|
210
|
+
|
211
|
+
- (<tt><span class='object_link'><a href="" title="Csv2hash::StructureValidator::MinColumns (class)">MinColumns</a></span></tt>) <strong>initialize</strong>(min_size)
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
</h3><div class="docstring">
|
218
|
+
<div class="discussion">
|
219
|
+
|
220
|
+
<p>Returns a new instance of MinColumns</p>
|
221
|
+
|
222
|
+
|
223
|
+
</div>
|
224
|
+
</div>
|
225
|
+
<div class="tags">
|
226
|
+
|
227
|
+
|
228
|
+
</div><table class="source_code">
|
229
|
+
<tr>
|
230
|
+
<td>
|
231
|
+
<pre class="lines">
|
232
|
+
|
233
|
+
|
234
|
+
7
|
235
|
+
8
|
236
|
+
9</pre>
|
237
|
+
</td>
|
238
|
+
<td>
|
239
|
+
<pre class="code"><span class="info file"># File 'lib/csv2hash/structure_validator/min_columns.rb', line 7</span>
|
240
|
+
|
241
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span> <span class='id identifier rubyid_min_size'>min_size</span>
|
242
|
+
<span class='ivar'>@min_size</span> <span class='op'>=</span> <span class='id identifier rubyid_min_size'>min_size</span>
|
243
|
+
<span class='kw'>end</span></pre>
|
244
|
+
</td>
|
245
|
+
</tr>
|
246
|
+
</table>
|
247
|
+
</div>
|
248
|
+
|
249
|
+
</div>
|
250
|
+
|
251
|
+
|
252
|
+
<div id="instance_method_details" class="method_details_list">
|
253
|
+
<h2>Instance Method Details</h2>
|
254
|
+
|
255
|
+
|
256
|
+
<div class="method_details first">
|
257
|
+
<h3 class="signature first" id="error_message-instance_method">
|
258
|
+
|
259
|
+
- (<tt>Object</tt>) <strong>error_message</strong>(line)
|
260
|
+
|
261
|
+
|
262
|
+
|
263
|
+
|
264
|
+
|
265
|
+
</h3><table class="source_code">
|
266
|
+
<tr>
|
267
|
+
<td>
|
268
|
+
<pre class="lines">
|
269
|
+
|
270
|
+
|
271
|
+
15
|
272
|
+
16
|
273
|
+
17</pre>
|
274
|
+
</td>
|
275
|
+
<td>
|
276
|
+
<pre class="code"><span class="info file"># File 'lib/csv2hash/structure_validator/min_columns.rb', line 15</span>
|
277
|
+
|
278
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_error_message'>error_message</span> <span class='id identifier rubyid_line'>line</span>
|
279
|
+
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Not enough columns (min. </span><span class='embexpr_beg'>#{</span><span class='ivar'>@min_size</span><span class='embexpr_end'>}</span><span class='tstring_content'>) on line </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_line'>line</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
280
|
+
<span class='kw'>end</span></pre>
|
281
|
+
</td>
|
282
|
+
</tr>
|
283
|
+
</table>
|
284
|
+
</div>
|
285
|
+
|
286
|
+
<div class="method_details ">
|
287
|
+
<h3 class="signature " id="validate_line-instance_method">
|
288
|
+
|
289
|
+
- (<tt>Object</tt>) <strong>validate_line</strong>(line)
|
290
|
+
|
291
|
+
|
292
|
+
|
293
|
+
|
294
|
+
|
295
|
+
</h3><table class="source_code">
|
296
|
+
<tr>
|
297
|
+
<td>
|
298
|
+
<pre class="lines">
|
299
|
+
|
300
|
+
|
301
|
+
11
|
302
|
+
12
|
303
|
+
13</pre>
|
304
|
+
</td>
|
305
|
+
<td>
|
306
|
+
<pre class="code"><span class="info file"># File 'lib/csv2hash/structure_validator/min_columns.rb', line 11</span>
|
307
|
+
|
308
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_validate_line'>validate_line</span> <span class='id identifier rubyid_line'>line</span>
|
309
|
+
<span class='id identifier rubyid_line'>line</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='op'><</span> <span class='ivar'>@min_size</span>
|
310
|
+
<span class='kw'>end</span></pre>
|
311
|
+
</td>
|
312
|
+
</tr>
|
313
|
+
</table>
|
314
|
+
</div>
|
315
|
+
|
316
|
+
</div>
|
317
|
+
|
318
|
+
</div>
|
319
|
+
|
320
|
+
<div id="footer">
|
321
|
+
Generated on Fri Aug 29 17:12:27 2014 by
|
322
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
323
|
+
0.8.7.4 (ruby-2.1.2).
|
324
|
+
</div>
|
325
|
+
|
326
|
+
</body>
|
327
|
+
</html>
|