csv2hash 0.6.2 → 0.6.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -5
  3. data/.yardoc/checksums +25 -0
  4. data/.yardoc/object_types +0 -0
  5. data/.yardoc/objects/root.dat +0 -0
  6. data/.yardoc/proxy_types +0 -0
  7. data/CHANGELOG.md +8 -0
  8. data/Gemfile +6 -0
  9. data/Gemfile.lock +15 -1
  10. data/README.md +32 -4
  11. data/UPGRADE.md +2 -0
  12. data/bin/generate_doc +3 -0
  13. data/config/example.csv +10 -0
  14. data/config/rules.yml +7 -0
  15. data/doc/Cell.html +282 -0
  16. data/doc/Csv2hash/Adapter/Abstract.html +215 -0
  17. data/doc/Csv2hash/Adapter/Base/UnsupportedAdapter.html +123 -0
  18. data/doc/Csv2hash/Adapter/Base.html +201 -0
  19. data/doc/Csv2hash/Adapter/CsvAdapter.html +348 -0
  20. data/doc/Csv2hash/Adapter/MemoryAdapter.html +348 -0
  21. data/doc/Csv2hash/Adapter.html +117 -0
  22. data/doc/Csv2hash/DataWrapper.html +500 -0
  23. data/doc/Csv2hash/Definition.html +1008 -0
  24. data/doc/Csv2hash/Discover.html +192 -0
  25. data/doc/Csv2hash/Expectation.html +202 -0
  26. data/doc/Csv2hash/ExtraValidator.html +207 -0
  27. data/doc/Csv2hash/Main.html +1298 -0
  28. data/doc/Csv2hash/Notifier.html +189 -0
  29. data/doc/Csv2hash/Parser/Collection.html +283 -0
  30. data/doc/Csv2hash/Parser/Mapping.html +266 -0
  31. data/doc/Csv2hash/Parser.html +121 -0
  32. data/doc/Csv2hash/StructureValidator/Deprecation.html +215 -0
  33. data/doc/Csv2hash/StructureValidator/MaxColumns.html +327 -0
  34. data/doc/Csv2hash/StructureValidator/MinColumns.html +327 -0
  35. data/doc/Csv2hash/StructureValidator/ValidationError.html +123 -0
  36. data/doc/Csv2hash/StructureValidator/Validator.html +184 -0
  37. data/doc/Csv2hash/StructureValidator.html +311 -0
  38. data/doc/Csv2hash/Validator/Collection.html +217 -0
  39. data/doc/Csv2hash/Validator/Mapping.html +200 -0
  40. data/doc/Csv2hash/Validator.html +295 -0
  41. data/doc/Csv2hash.html +131 -0
  42. data/doc/CsvArray.html +200 -0
  43. data/doc/Registry.html +312 -0
  44. data/doc/_index.html +391 -0
  45. data/doc/class_list.html +54 -0
  46. data/doc/css/common.css +1 -0
  47. data/doc/css/full_list.css +57 -0
  48. data/doc/css/style.css +339 -0
  49. data/doc/file.README.html +499 -0
  50. data/doc/file_list.html +56 -0
  51. data/doc/frames.html +26 -0
  52. data/doc/index.html +499 -0
  53. data/doc/js/app.js +219 -0
  54. data/doc/js/full_list.js +178 -0
  55. data/doc/js/jquery.js +4 -0
  56. data/doc/method_list.html +473 -0
  57. data/doc/top-level-namespace.html +114 -0
  58. data/lib/csv2hash/definition.rb +3 -3
  59. data/lib/csv2hash/version.rb +1 -1
  60. data/lib/csv2hash/yaml_loader.rb +33 -0
  61. data/lib/csv2hash.rb +28 -8
  62. data/spec/csv2hash/yaml_loader_spec.rb +20 -0
  63. data/spec/csv2hash_spec.rb +13 -10
  64. metadata +56 -1
@@ -0,0 +1,473 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html>
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+
7
+ <link rel="stylesheet" href="css/full_list.css" type="text/css" media="screen" charset="utf-8" />
8
+
9
+ <link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />
10
+
11
+
12
+
13
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
14
+
15
+ <script type="text/javascript" charset="utf-8" src="js/full_list.js"></script>
16
+
17
+
18
+ <title>Method List</title>
19
+ <base id="base_target" target="_parent" />
20
+ </head>
21
+ <body>
22
+ <script type="text/javascript" charset="utf-8">
23
+ if (window.top.frames.main) {
24
+ document.getElementById('base_target').target = 'main';
25
+ document.body.className = 'frames';
26
+ }
27
+ </script>
28
+ <div id="content">
29
+ <h1 id="full_list_header">Method List</h1>
30
+ <div id="nav">
31
+
32
+ <span><a target="_self" href="class_list.html">
33
+ Classes
34
+ </a></span>
35
+
36
+ <span><a target="_self" href="method_list.html">
37
+ Methods
38
+ </a></span>
39
+
40
+ <span><a target="_self" href="file_list.html">
41
+ Files
42
+ </a></span>
43
+
44
+ </div>
45
+ <div id="search">Search: <input type="text" /></div>
46
+
47
+ <ul id="full_list" class="method">
48
+
49
+
50
+ <li class="r1 ">
51
+ <span class='object_link'><a href="Registry.html#%5B%5D-instance_method" title="Registry#[] (method)">#[]</a></span>
52
+ <small>Registry</small>
53
+ </li>
54
+
55
+
56
+ <li class="r2 ">
57
+ <span class='object_link'><a href="Csv2hash/Main.html#%5B%5D-class_method" title="Csv2hash::Main.[] (method)">[]</a></span>
58
+ <small>Csv2hash::Main</small>
59
+ </li>
60
+
61
+
62
+ <li class="r1 ">
63
+ <span class='object_link'><a href="Registry.html#%5B%5D%3D-instance_method" title="Registry#[]= (method)">#[]=</a></span>
64
+ <small>Registry</small>
65
+ </li>
66
+
67
+
68
+ <li class="r2 ">
69
+ <span class='object_link'><a href="Csv2hash/Main.html#%5B%5D%3D-class_method" title="Csv2hash::Main.[]= (method)">[]=</a></span>
70
+ <small>Csv2hash::Main</small>
71
+ </li>
72
+
73
+
74
+ <li class="r1 ">
75
+ <span class='object_link'><a href="Csv2hash/Main.html#break_on_failure-instance_method" title="Csv2hash::Main#break_on_failure (method)">#break_on_failure</a></span>
76
+ <small>Csv2hash::Main</small>
77
+ </li>
78
+
79
+
80
+ <li class="r2 ">
81
+ <span class='object_link'><a href="Csv2hash/Definition.html#cell-instance_method" title="Csv2hash::Definition#cell (method)">#cell</a></span>
82
+ <small>Csv2hash::Definition</small>
83
+ </li>
84
+
85
+
86
+ <li class="r1 ">
87
+ <span class='object_link'><a href="Csv2hash/Definition.html#cells-instance_method" title="Csv2hash::Definition#cells (method)">#cells</a></span>
88
+ <small>Csv2hash::Definition</small>
89
+ </li>
90
+
91
+
92
+ <li class="r2 ">
93
+ <span class='object_link'><a href="Csv2hash/StructureValidator/Deprecation.html#check_params-instance_method" title="Csv2hash::StructureValidator::Deprecation#check_params (method)">#check_params</a></span>
94
+ <small>Csv2hash::StructureValidator::Deprecation</small>
95
+ </li>
96
+
97
+
98
+ <li class="r1 ">
99
+ <span class='object_link'><a href="Csv2hash/Adapter/Base.html#create-class_method" title="Csv2hash::Adapter::Base.create (method)">create</a></span>
100
+ <small>Csv2hash::Adapter::Base</small>
101
+ </li>
102
+
103
+
104
+ <li class="r2 ">
105
+ <span class='object_link'><a href="Csv2hash/Main.html#csv_with_errors-instance_method" title="Csv2hash::Main#csv_with_errors (method)">#csv_with_errors</a></span>
106
+ <small>Csv2hash::Main</small>
107
+ </li>
108
+
109
+
110
+ <li class="r1 ">
111
+ <span class='object_link'><a href="Csv2hash/Adapter/MemoryAdapter.html#data-instance_method" title="Csv2hash::Adapter::MemoryAdapter#data (method)">#data</a></span>
112
+ <small>Csv2hash::Adapter::MemoryAdapter</small>
113
+ </li>
114
+
115
+
116
+ <li class="r2 ">
117
+ <span class='object_link'><a href="Csv2hash/DataWrapper.html#data-instance_method" title="Csv2hash::DataWrapper#data (method)">#data</a></span>
118
+ <small>Csv2hash::DataWrapper</small>
119
+ </li>
120
+
121
+
122
+ <li class="r1 ">
123
+ <span class='object_link'><a href="Csv2hash/Main.html#data-instance_method" title="Csv2hash::Main#data (method)">#data</a></span>
124
+ <small>Csv2hash::Main</small>
125
+ </li>
126
+
127
+
128
+ <li class="r2 ">
129
+ <span class='object_link'><a href="Csv2hash/Main.html#data_source-instance_method" title="Csv2hash::Main#data_source (method)">#data_source</a></span>
130
+ <small>Csv2hash::Main</small>
131
+ </li>
132
+
133
+
134
+ <li class="r1 ">
135
+ <span class='object_link'><a href="Csv2hash/Definition.html#default%21-instance_method" title="Csv2hash::Definition#default! (method)">#default!</a></span>
136
+ <small>Csv2hash::Definition</small>
137
+ </li>
138
+
139
+
140
+ <li class="r2 ">
141
+ <span class='object_link'><a href="Csv2hash/Main.html#definition-instance_method" title="Csv2hash::Main#definition (method)">#definition</a></span>
142
+ <small>Csv2hash::Main</small>
143
+ </li>
144
+
145
+
146
+ <li class="r1 ">
147
+ <span class='object_link'><a href="Csv2hash/StructureValidator/MinColumns.html#error_message-instance_method" title="Csv2hash::StructureValidator::MinColumns#error_message (method)">#error_message</a></span>
148
+ <small>Csv2hash::StructureValidator::MinColumns</small>
149
+ </li>
150
+
151
+
152
+ <li class="r2 ">
153
+ <span class='object_link'><a href="Csv2hash/StructureValidator/MaxColumns.html#error_message-instance_method" title="Csv2hash::StructureValidator::MaxColumns#error_message (method)">#error_message</a></span>
154
+ <small>Csv2hash::StructureValidator::MaxColumns</small>
155
+ </li>
156
+
157
+
158
+ <li class="r1 ">
159
+ <span class='object_link'><a href="Csv2hash/DataWrapper.html#errors-instance_method" title="Csv2hash::DataWrapper#errors (method)">#errors</a></span>
160
+ <small>Csv2hash::DataWrapper</small>
161
+ </li>
162
+
163
+
164
+ <li class="r2 ">
165
+ <span class='object_link'><a href="Csv2hash/Main.html#errors-instance_method" title="Csv2hash::Main#errors (method)">#errors</a></span>
166
+ <small>Csv2hash::Main</small>
167
+ </li>
168
+
169
+
170
+ <li class="r1 ">
171
+ <span class='object_link'><a href="Csv2hash/Adapter/CsvAdapter.html#file_path-instance_method" title="Csv2hash::Adapter::CsvAdapter#file_path (method)">#file_path</a></span>
172
+ <small>Csv2hash::Adapter::CsvAdapter</small>
173
+ </li>
174
+
175
+
176
+ <li class="r2 ">
177
+ <span class='object_link'><a href="Csv2hash/Main.html#file_path_or_data-instance_method" title="Csv2hash::Main#file_path_or_data (method)">#file_path_or_data</a></span>
178
+ <small>Csv2hash::Main</small>
179
+ </li>
180
+
181
+
182
+ <li class="r1 ">
183
+ <span class='object_link'><a href="Csv2hash/Parser/Mapping.html#fill%21-instance_method" title="Csv2hash::Parser::Mapping#fill! (method)">#fill!</a></span>
184
+ <small>Csv2hash::Parser::Mapping</small>
185
+ </li>
186
+
187
+
188
+ <li class="r2 ">
189
+ <span class='object_link'><a href="Csv2hash/Parser/Collection.html#fill%21-instance_method" title="Csv2hash::Parser::Collection#fill! (method)">#fill!</a></span>
190
+ <small>Csv2hash::Parser::Collection</small>
191
+ </li>
192
+
193
+
194
+ <li class="r1 ">
195
+ <span class='object_link'><a href="Csv2hash/Parser/Mapping.html#fill_it-instance_method" title="Csv2hash::Parser::Mapping#fill_it (method)">#fill_it</a></span>
196
+ <small>Csv2hash::Parser::Mapping</small>
197
+ </li>
198
+
199
+
200
+ <li class="r2 ">
201
+ <span class='object_link'><a href="Csv2hash/Parser/Collection.html#fill_it-instance_method" title="Csv2hash::Parser::Collection#fill_it (method)">#fill_it</a></span>
202
+ <small>Csv2hash::Parser::Collection</small>
203
+ </li>
204
+
205
+
206
+ <li class="r1 ">
207
+ <span class='object_link'><a href="Csv2hash/Discover.html#find_positions%21-instance_method" title="Csv2hash::Discover#find_positions! (method)">#find_positions!</a></span>
208
+ <small>Csv2hash::Discover</small>
209
+ </li>
210
+
211
+
212
+ <li class="r2 ">
213
+ <span class='object_link'><a href="Csv2hash/Main.html#generate_definition-class_method" title="Csv2hash::Main.generate_definition (method)">generate_definition</a></span>
214
+ <small>Csv2hash::Main</small>
215
+ </li>
216
+
217
+
218
+ <li class="r1 ">
219
+ <span class='object_link'><a href="Csv2hash/Definition.html#header_size-instance_method" title="Csv2hash::Definition#header_size (method)">#header_size</a></span>
220
+ <small>Csv2hash::Definition</small>
221
+ </li>
222
+
223
+
224
+ <li class="r2 ">
225
+ <span class='object_link'><a href="Csv2hash/Main.html#init_plugins-instance_method" title="Csv2hash::Main#init_plugins (method)">#init_plugins</a></span>
226
+ <small>Csv2hash::Main</small>
227
+ </li>
228
+
229
+
230
+ <li class="r1 ">
231
+ <span class='object_link'><a href="Csv2hash/Adapter/MemoryAdapter.html#initialize-instance_method" title="Csv2hash::Adapter::MemoryAdapter#initialize (method)">#initialize</a></span>
232
+ <small>Csv2hash::Adapter::MemoryAdapter</small>
233
+ </li>
234
+
235
+
236
+ <li class="r2 ">
237
+ <span class='object_link'><a href="Csv2hash/Definition.html#initialize-instance_method" title="Csv2hash::Definition#initialize (method)">#initialize</a></span>
238
+ <small>Csv2hash::Definition</small>
239
+ </li>
240
+
241
+
242
+ <li class="r1 ">
243
+ <span class='object_link'><a href="Csv2hash/DataWrapper.html#initialize-instance_method" title="Csv2hash::DataWrapper#initialize (method)">#initialize</a></span>
244
+ <small>Csv2hash::DataWrapper</small>
245
+ </li>
246
+
247
+
248
+ <li class="r2 ">
249
+ <span class='object_link'><a href="Csv2hash/StructureValidator/MinColumns.html#initialize-instance_method" title="Csv2hash::StructureValidator::MinColumns#initialize (method)">#initialize</a></span>
250
+ <small>Csv2hash::StructureValidator::MinColumns</small>
251
+ </li>
252
+
253
+
254
+ <li class="r1 ">
255
+ <span class='object_link'><a href="Cell.html#initialize-instance_method" title="Cell#initialize (method)">#initialize</a></span>
256
+ <small>Cell</small>
257
+ </li>
258
+
259
+
260
+ <li class="r2 ">
261
+ <span class='object_link'><a href="Csv2hash/StructureValidator/MaxColumns.html#initialize-instance_method" title="Csv2hash::StructureValidator::MaxColumns#initialize (method)">#initialize</a></span>
262
+ <small>Csv2hash::StructureValidator::MaxColumns</small>
263
+ </li>
264
+
265
+
266
+ <li class="r1 ">
267
+ <span class='object_link'><a href="Registry.html#initialize-instance_method" title="Registry#initialize (method)">#initialize</a></span>
268
+ <small>Registry</small>
269
+ </li>
270
+
271
+
272
+ <li class="r2 ">
273
+ <span class='object_link'><a href="Csv2hash/Adapter/CsvAdapter.html#initialize-instance_method" title="Csv2hash::Adapter::CsvAdapter#initialize (method)">#initialize</a></span>
274
+ <small>Csv2hash::Adapter::CsvAdapter</small>
275
+ </li>
276
+
277
+
278
+ <li class="r1 ">
279
+ <span class='object_link'><a href="Csv2hash/Main.html#initialize-instance_method" title="Csv2hash::Main#initialize (method)">#initialize</a></span>
280
+ <small>Csv2hash::Main</small>
281
+ </li>
282
+
283
+
284
+ <li class="r2 ">
285
+ <span class='object_link'><a href="Csv2hash/Definition.html#mapping-instance_method" title="Csv2hash::Definition#mapping (method)">#mapping</a></span>
286
+ <small>Csv2hash::Definition</small>
287
+ </li>
288
+
289
+
290
+ <li class="r1 ">
291
+ <span class='object_link'><a href="Csv2hash/Definition.html#name-instance_method" title="Csv2hash::Definition#name (method)">#name</a></span>
292
+ <small>Csv2hash::Definition</small>
293
+ </li>
294
+
295
+
296
+ <li class="r2 ">
297
+ <span class='object_link'><a href="Csv2hash/Main.html#notifier-instance_method" title="Csv2hash::Main#notifier (method)">#notifier</a></span>
298
+ <small>Csv2hash::Main</small>
299
+ </li>
300
+
301
+
302
+ <li class="r1 ">
303
+ <span class='object_link'><a href="Csv2hash/Notifier.html#notify-instance_method" title="Csv2hash::Notifier#notify (method)">#notify</a></span>
304
+ <small>Csv2hash::Notifier</small>
305
+ </li>
306
+
307
+
308
+ <li class="r2 ">
309
+ <span class='object_link'><a href="Csv2hash/Main.html#options-instance_method" title="Csv2hash::Main#options (method)">#options</a></span>
310
+ <small>Csv2hash::Main</small>
311
+ </li>
312
+
313
+
314
+ <li class="r1 ">
315
+ <span class='object_link'><a href="Csv2hash/Main.html#parse-instance_method" title="Csv2hash::Main#parse (method)">#parse</a></span>
316
+ <small>Csv2hash::Main</small>
317
+ </li>
318
+
319
+
320
+ <li class="r2 ">
321
+ <span class='object_link'><a href="Csv2hash/Main.html#parse%21-instance_method" title="Csv2hash::Main#parse! (method)">#parse!</a></span>
322
+ <small>Csv2hash::Main</small>
323
+ </li>
324
+
325
+
326
+ <li class="r1 ">
327
+ <span class='object_link'><a href="Csv2hash/StructureValidator.html#rule_instance-instance_method" title="Csv2hash::StructureValidator#rule_instance (method)">#rule_instance</a></span>
328
+ <small>Csv2hash::StructureValidator</small>
329
+ </li>
330
+
331
+
332
+ <li class="r2 ">
333
+ <span class='object_link'><a href="Cell.html#rules-instance_method" title="Cell#rules (method)">#rules</a></span>
334
+ <small>Cell</small>
335
+ </li>
336
+
337
+
338
+ <li class="r1 ">
339
+ <span class='object_link'><a href="Csv2hash/Definition.html#set_header_size-instance_method" title="Csv2hash::Definition#set_header_size (method)">#set_header_size</a></span>
340
+ <small>Csv2hash::Definition</small>
341
+ </li>
342
+
343
+
344
+ <li class="r2 ">
345
+ <span class='object_link'><a href="Csv2hash/Definition.html#set_structure_rules-instance_method" title="Csv2hash::Definition#set_structure_rules (method)">#set_structure_rules</a></span>
346
+ <small>Csv2hash::Definition</small>
347
+ </li>
348
+
349
+
350
+ <li class="r1 ">
351
+ <span class='object_link'><a href="Csv2hash/Definition.html#set_type-instance_method" title="Csv2hash::Definition#set_type (method)">#set_type</a></span>
352
+ <small>Csv2hash::Definition</small>
353
+ </li>
354
+
355
+
356
+ <li class="r2 ">
357
+ <span class='object_link'><a href="Csv2hash/Adapter/CsvAdapter.html#source-instance_method" title="Csv2hash::Adapter::CsvAdapter#source (method)">#source</a></span>
358
+ <small>Csv2hash::Adapter::CsvAdapter</small>
359
+ </li>
360
+
361
+
362
+ <li class="r1 ">
363
+ <span class='object_link'><a href="Csv2hash/Adapter/Abstract.html#source-instance_method" title="Csv2hash::Adapter::Abstract#source (method)">#source</a></span>
364
+ <small>Csv2hash::Adapter::Abstract</small>
365
+ </li>
366
+
367
+
368
+ <li class="r2 ">
369
+ <span class='object_link'><a href="Csv2hash/Adapter/MemoryAdapter.html#source-instance_method" title="Csv2hash::Adapter::MemoryAdapter#source (method)">#source</a></span>
370
+ <small>Csv2hash::Adapter::MemoryAdapter</small>
371
+ </li>
372
+
373
+
374
+ <li class="r1 ">
375
+ <span class='object_link'><a href="Csv2hash/Definition.html#structure_rules-instance_method" title="Csv2hash::Definition#structure_rules (method)">#structure_rules</a></span>
376
+ <small>Csv2hash::Definition</small>
377
+ </li>
378
+
379
+
380
+ <li class="r2 ">
381
+ <span class='object_link'><a href="CsvArray.html#to_csv-instance_method" title="CsvArray#to_csv (method)">#to_csv</a></span>
382
+ <small>CsvArray</small>
383
+ </li>
384
+
385
+
386
+ <li class="r1 ">
387
+ <span class='object_link'><a href="Csv2hash/Definition.html#type-instance_method" title="Csv2hash::Definition#type (method)">#type</a></span>
388
+ <small>Csv2hash::Definition</small>
389
+ </li>
390
+
391
+
392
+ <li class="r2 ">
393
+ <span class='object_link'><a href="Csv2hash/Expectation.html#unexpected_line%3F-instance_method" title="Csv2hash::Expectation#unexpected_line? (method)">#unexpected_line?</a></span>
394
+ <small>Csv2hash::Expectation</small>
395
+ </li>
396
+
397
+
398
+ <li class="r1 ">
399
+ <span class='object_link'><a href="Csv2hash/DataWrapper.html#valid-instance_method" title="Csv2hash::DataWrapper#valid (method)">#valid</a></span>
400
+ <small>Csv2hash::DataWrapper</small>
401
+ </li>
402
+
403
+
404
+ <li class="r2 ">
405
+ <span class='object_link'><a href="Csv2hash/Validator.html#valid%3F-instance_method" title="Csv2hash::Validator#valid? (method)">#valid?</a></span>
406
+ <small>Csv2hash::Validator</small>
407
+ </li>
408
+
409
+
410
+ <li class="r1 ">
411
+ <span class='object_link'><a href="Csv2hash/ExtraValidator.html#valid%3F-instance_method" title="Csv2hash::ExtraValidator#valid? (method)">#valid?</a></span>
412
+ <small>Csv2hash::ExtraValidator</small>
413
+ </li>
414
+
415
+
416
+ <li class="r2 ">
417
+ <span class='object_link'><a href="Csv2hash/DataWrapper.html#valid%3F-instance_method" title="Csv2hash::DataWrapper#valid? (method)">#valid?</a></span>
418
+ <small>Csv2hash::DataWrapper</small>
419
+ </li>
420
+
421
+
422
+ <li class="r1 ">
423
+ <span class='object_link'><a href="Csv2hash/Definition.html#validate%21-instance_method" title="Csv2hash::Definition#validate! (method)">#validate!</a></span>
424
+ <small>Csv2hash::Definition</small>
425
+ </li>
426
+
427
+
428
+ <li class="r2 ">
429
+ <span class='object_link'><a href="Csv2hash/StructureValidator/Validator.html#validate%21-instance_method" title="Csv2hash::StructureValidator::Validator#validate! (method)">#validate!</a></span>
430
+ <small>Csv2hash::StructureValidator::Validator</small>
431
+ </li>
432
+
433
+
434
+ <li class="r1 ">
435
+ <span class='object_link'><a href="Csv2hash/Validator/Mapping.html#validate_data%21-instance_method" title="Csv2hash::Validator::Mapping#validate_data! (method)">#validate_data!</a></span>
436
+ <small>Csv2hash::Validator::Mapping</small>
437
+ </li>
438
+
439
+
440
+ <li class="r2 ">
441
+ <span class='object_link'><a href="Csv2hash/Validator/Collection.html#validate_data%21-instance_method" title="Csv2hash::Validator::Collection#validate_data! (method)">#validate_data!</a></span>
442
+ <small>Csv2hash::Validator::Collection</small>
443
+ </li>
444
+
445
+
446
+ <li class="r1 ">
447
+ <span class='object_link'><a href="Csv2hash/StructureValidator/MaxColumns.html#validate_line-instance_method" title="Csv2hash::StructureValidator::MaxColumns#validate_line (method)">#validate_line</a></span>
448
+ <small>Csv2hash::StructureValidator::MaxColumns</small>
449
+ </li>
450
+
451
+
452
+ <li class="r2 ">
453
+ <span class='object_link'><a href="Csv2hash/StructureValidator/MinColumns.html#validate_line-instance_method" title="Csv2hash::StructureValidator::MinColumns#validate_line (method)">#validate_line</a></span>
454
+ <small>Csv2hash::StructureValidator::MinColumns</small>
455
+ </li>
456
+
457
+
458
+ <li class="r1 ">
459
+ <span class='object_link'><a href="Csv2hash/Validator.html#validate_rules-instance_method" title="Csv2hash::Validator#validate_rules (method)">#validate_rules</a></span>
460
+ <small>Csv2hash::Validator</small>
461
+ </li>
462
+
463
+
464
+ <li class="r2 ">
465
+ <span class='object_link'><a href="Csv2hash/StructureValidator.html#validate_structure%21-instance_method" title="Csv2hash::StructureValidator#validate_structure! (method)">#validate_structure!</a></span>
466
+ <small>Csv2hash::StructureValidator</small>
467
+ </li>
468
+
469
+
470
+ </ul>
471
+ </div>
472
+ </body>
473
+ </html>
@@ -0,0 +1,114 @@
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
+ Top Level Namespace
8
+
9
+ &mdash; 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#!top-level-namespace.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</a> &raquo;
35
+
36
+
37
+ <span class="title">Top Level Namespace</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>Top Level Namespace
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+ </dl>
82
+ <div class="clear"></div>
83
+
84
+ <h2>Defined Under Namespace</h2>
85
+ <p class="children">
86
+
87
+
88
+ <strong class="modules">Modules:</strong> <span class='object_link'><a href="Csv2hash.html" title="Csv2hash (module)">Csv2hash</a></span>
89
+
90
+
91
+
92
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="Cell.html" title="Cell (class)">Cell</a></span>, <span class='object_link'><a href="CsvArray.html" title="CsvArray (class)">CsvArray</a></span>, <span class='object_link'><a href="Registry.html" title="Registry (class)">Registry</a></span>
93
+
94
+
95
+ </p>
96
+
97
+
98
+
99
+
100
+
101
+
102
+
103
+
104
+
105
+ </div>
106
+
107
+ <div id="footer">
108
+ Generated on Fri Aug 29 17:12:26 2014 by
109
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
110
+ 0.8.7.4 (ruby-2.1.2).
111
+ </div>
112
+
113
+ </body>
114
+ </html>
@@ -6,11 +6,11 @@ module Csv2hash
6
6
 
7
7
  TYPES = [ MAPPING, COLLECTION ]
8
8
 
9
- attr_accessor :cells, :structure_rules, :header_size
10
- attr_reader :type, :name
9
+ attr_accessor :cells, :structure_rules, :header_size, :name
10
+ attr_reader :type
11
11
 
12
12
  def initialize name, &blk
13
- @name = name
13
+ self.name = name
14
14
  self.cells = []
15
15
  self.header_size = 0
16
16
  self.structure_rules = {}
@@ -1,3 +1,3 @@
1
1
  module Csv2hash
2
- VERSION = '0.6.2'
2
+ VERSION = '0.6.3'
3
3
  end
@@ -0,0 +1,33 @@
1
+ require 'active_support/core_ext'
2
+ require 'yaml'
3
+
4
+ module Csv2hash
5
+ class YamlLoader
6
+
7
+ attr_reader :conf
8
+ attr_accessor :definition
9
+
10
+ def initialize file
11
+ @conf = YAML.load_file(file)
12
+ self.conf.deep_symbolize_keys!
13
+ end
14
+
15
+ def load!
16
+ mapping = self.conf.fetch(:mapping)
17
+ header_size = self.conf.fetch(:header_size).to_i
18
+ structure_rules = self.conf.fetch(:structure_rules)
19
+
20
+ self.definition = Main.generate_definition self.conf.fetch(:name) do
21
+ set_type { mapping }
22
+ set_header_size { header_size }
23
+ set_structure_rules { structure_rules }
24
+ end
25
+
26
+ self.conf.fetch(:rules).each do |rule|
27
+ definition.cells << Cell.new(rule)
28
+ end
29
+
30
+ Main[self.conf.fetch(:name)] = self.definition
31
+ end
32
+ end
33
+ end