csv_decision2 0.5.1

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.
Files changed (134) hide show
  1. checksums.yaml +7 -0
  2. data/.codeclimate.yml +3 -0
  3. data/.coveralls.yml +2 -0
  4. data/.gitignore +14 -0
  5. data/.rspec +2 -0
  6. data/.rubocop.yml +30 -0
  7. data/.travis.yml +6 -0
  8. data/CHANGELOG.md +85 -0
  9. data/Dockerfile +6 -0
  10. data/Gemfile +7 -0
  11. data/LICENSE +21 -0
  12. data/README.md +356 -0
  13. data/benchmarks/rufus_decision.rb +158 -0
  14. data/csv_decision2.gemspec +38 -0
  15. data/doc/CSVDecision/CellValidationError.html +143 -0
  16. data/doc/CSVDecision/Columns/Default.html +589 -0
  17. data/doc/CSVDecision/Columns/Dictionary.html +801 -0
  18. data/doc/CSVDecision/Columns/Entry.html +508 -0
  19. data/doc/CSVDecision/Columns.html +1259 -0
  20. data/doc/CSVDecision/Constant.html +254 -0
  21. data/doc/CSVDecision/Data.html +479 -0
  22. data/doc/CSVDecision/Decide.html +302 -0
  23. data/doc/CSVDecision/Decision.html +1011 -0
  24. data/doc/CSVDecision/Defaults.html +291 -0
  25. data/doc/CSVDecision/Dictionary/Entry.html +1147 -0
  26. data/doc/CSVDecision/Dictionary.html +426 -0
  27. data/doc/CSVDecision/Error.html +139 -0
  28. data/doc/CSVDecision/FileError.html +143 -0
  29. data/doc/CSVDecision/Function.html +240 -0
  30. data/doc/CSVDecision/Guard.html +245 -0
  31. data/doc/CSVDecision/Header.html +647 -0
  32. data/doc/CSVDecision/Index.html +741 -0
  33. data/doc/CSVDecision/Input.html +404 -0
  34. data/doc/CSVDecision/Load.html +296 -0
  35. data/doc/CSVDecision/Matchers/Constant.html +484 -0
  36. data/doc/CSVDecision/Matchers/Function.html +511 -0
  37. data/doc/CSVDecision/Matchers/Guard.html +503 -0
  38. data/doc/CSVDecision/Matchers/Matcher.html +507 -0
  39. data/doc/CSVDecision/Matchers/Numeric.html +415 -0
  40. data/doc/CSVDecision/Matchers/Pattern.html +491 -0
  41. data/doc/CSVDecision/Matchers/Proc.html +704 -0
  42. data/doc/CSVDecision/Matchers/Range.html +379 -0
  43. data/doc/CSVDecision/Matchers/Symbol.html +426 -0
  44. data/doc/CSVDecision/Matchers.html +1567 -0
  45. data/doc/CSVDecision/Numeric.html +259 -0
  46. data/doc/CSVDecision/Options.html +443 -0
  47. data/doc/CSVDecision/Parse.html +282 -0
  48. data/doc/CSVDecision/Paths.html +742 -0
  49. data/doc/CSVDecision/Result.html +1200 -0
  50. data/doc/CSVDecision/Scan/InputHashes.html +369 -0
  51. data/doc/CSVDecision/Scan.html +313 -0
  52. data/doc/CSVDecision/ScanRow.html +866 -0
  53. data/doc/CSVDecision/Symbol.html +256 -0
  54. data/doc/CSVDecision/Table.html +1470 -0
  55. data/doc/CSVDecision/TableValidationError.html +143 -0
  56. data/doc/CSVDecision/Validate.html +422 -0
  57. data/doc/CSVDecision.html +621 -0
  58. data/doc/_index.html +471 -0
  59. data/doc/class_list.html +51 -0
  60. data/doc/css/common.css +1 -0
  61. data/doc/css/full_list.css +58 -0
  62. data/doc/css/style.css +499 -0
  63. data/doc/file.README.html +421 -0
  64. data/doc/file_list.html +56 -0
  65. data/doc/frames.html +17 -0
  66. data/doc/index.html +421 -0
  67. data/doc/js/app.js +248 -0
  68. data/doc/js/full_list.js +216 -0
  69. data/doc/js/jquery.js +4 -0
  70. data/doc/method_list.html +1163 -0
  71. data/doc/top-level-namespace.html +110 -0
  72. data/docker-compose.yml +13 -0
  73. data/lib/csv_decision/columns.rb +192 -0
  74. data/lib/csv_decision/data.rb +92 -0
  75. data/lib/csv_decision/decision.rb +196 -0
  76. data/lib/csv_decision/defaults.rb +47 -0
  77. data/lib/csv_decision/dictionary.rb +180 -0
  78. data/lib/csv_decision/header.rb +83 -0
  79. data/lib/csv_decision/index.rb +107 -0
  80. data/lib/csv_decision/input.rb +121 -0
  81. data/lib/csv_decision/load.rb +36 -0
  82. data/lib/csv_decision/matchers/constant.rb +74 -0
  83. data/lib/csv_decision/matchers/function.rb +56 -0
  84. data/lib/csv_decision/matchers/guard.rb +142 -0
  85. data/lib/csv_decision/matchers/numeric.rb +44 -0
  86. data/lib/csv_decision/matchers/pattern.rb +94 -0
  87. data/lib/csv_decision/matchers/range.rb +95 -0
  88. data/lib/csv_decision/matchers/symbol.rb +149 -0
  89. data/lib/csv_decision/matchers.rb +220 -0
  90. data/lib/csv_decision/options.rb +124 -0
  91. data/lib/csv_decision/parse.rb +165 -0
  92. data/lib/csv_decision/paths.rb +78 -0
  93. data/lib/csv_decision/result.rb +204 -0
  94. data/lib/csv_decision/scan.rb +117 -0
  95. data/lib/csv_decision/scan_row.rb +142 -0
  96. data/lib/csv_decision/table.rb +101 -0
  97. data/lib/csv_decision/validate.rb +85 -0
  98. data/lib/csv_decision.rb +45 -0
  99. data/spec/csv_decision/columns_spec.rb +251 -0
  100. data/spec/csv_decision/constant_spec.rb +36 -0
  101. data/spec/csv_decision/data_spec.rb +50 -0
  102. data/spec/csv_decision/decision_spec.rb +19 -0
  103. data/spec/csv_decision/examples_spec.rb +242 -0
  104. data/spec/csv_decision/index_spec.rb +58 -0
  105. data/spec/csv_decision/input_spec.rb +55 -0
  106. data/spec/csv_decision/load_spec.rb +28 -0
  107. data/spec/csv_decision/matchers/function_spec.rb +82 -0
  108. data/spec/csv_decision/matchers/guard_spec.rb +170 -0
  109. data/spec/csv_decision/matchers/numeric_spec.rb +47 -0
  110. data/spec/csv_decision/matchers/pattern_spec.rb +183 -0
  111. data/spec/csv_decision/matchers/range_spec.rb +70 -0
  112. data/spec/csv_decision/matchers/symbol_spec.rb +67 -0
  113. data/spec/csv_decision/options_spec.rb +94 -0
  114. data/spec/csv_decision/parse_spec.rb +44 -0
  115. data/spec/csv_decision/table_spec.rb +683 -0
  116. data/spec/csv_decision_spec.rb +7 -0
  117. data/spec/data/invalid/empty.csv +0 -0
  118. data/spec/data/invalid/invalid_header1.csv +4 -0
  119. data/spec/data/invalid/invalid_header2.csv +4 -0
  120. data/spec/data/invalid/invalid_header3.csv +4 -0
  121. data/spec/data/invalid/invalid_header4.csv +4 -0
  122. data/spec/data/valid/benchmark_regexp.csv +10 -0
  123. data/spec/data/valid/index_example.csv +13 -0
  124. data/spec/data/valid/multi_column_index.csv +10 -0
  125. data/spec/data/valid/multi_column_index2.csv +12 -0
  126. data/spec/data/valid/options_in_file1.csv +5 -0
  127. data/spec/data/valid/options_in_file2.csv +5 -0
  128. data/spec/data/valid/options_in_file3.csv +13 -0
  129. data/spec/data/valid/regular_expressions.csv +11 -0
  130. data/spec/data/valid/simple_constants.csv +5 -0
  131. data/spec/data/valid/simple_example.csv +10 -0
  132. data/spec/data/valid/valid.csv +4 -0
  133. data/spec/spec_helper.rb +106 -0
  134. metadata +352 -0
@@ -0,0 +1,1147 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Class: CSVDecision::Dictionary::Entry
8
+
9
+ &mdash; Documentation by YARD 0.9.12
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
+ pathId = "CSVDecision::Dictionary::Entry";
19
+ relpath = '../../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../../_index.html">Index (E)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../../CSVDecision.html" title="CSVDecision (module)">CSVDecision</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Dictionary.html" title="CSVDecision::Dictionary (module)">Dictionary</a></span></span>
41
+ &raquo;
42
+ <span class="title">Entry</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
+ </div>
61
+
62
+ <div id="content"><h1>Class: CSVDecision::Dictionary::Entry
63
+
64
+
65
+ <span class="private note title">Private</span>
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName">Object</span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next">CSVDecision::Dictionary::Entry</li>
78
+
79
+ </ul>
80
+ <a href="#" class="inheritanceTree">show all</a>
81
+
82
+ </dd>
83
+ </dl>
84
+
85
+
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+ <dl>
96
+ <dt>Defined in:</dt>
97
+ <dd>lib/csv_decision/dictionary.rb</dd>
98
+ </dl>
99
+
100
+ </div>
101
+
102
+ <h2>Overview</h2><div class="docstring">
103
+ <div class="discussion">
104
+ <p class="note private">
105
+ <strong>This class is part of a private API.</strong>
106
+ You should avoid using this class if possible, as it may be removed or be changed in the future.
107
+ </p>
108
+
109
+ <p>Column dictionary entries.</p>
110
+
111
+
112
+ </div>
113
+ </div>
114
+ <div class="tags">
115
+
116
+
117
+ </div>
118
+
119
+
120
+
121
+ <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
122
+ <ul class="summary">
123
+
124
+ <li class="public ">
125
+ <span class="summary_signature">
126
+
127
+ <a href="#eval-instance_method" title="#eval (instance method)">#<strong>eval</strong> &#x21d2; nil, Boolean </a>
128
+
129
+
130
+
131
+ </span>
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+ <span class="private note title">private</span>
142
+
143
+
144
+ <span class="summary_desc"><div class='inline'>
145
+ <p>If set to true then this column has procs that need evaluating, otherwise
146
+ it only contains constants.</p>
147
+ </div></span>
148
+
149
+ </li>
150
+
151
+
152
+ <li class="public ">
153
+ <span class="summary_signature">
154
+
155
+ <a href="#function-instance_method" title="#function (instance method)">#<strong>function</strong> &#x21d2; Matchers::Proc, Object </a>
156
+
157
+
158
+
159
+ </span>
160
+
161
+
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+ <span class="private note title">private</span>
170
+
171
+
172
+ <span class="summary_desc"><div class='inline'>
173
+ <p>For a column of type set: gives the proc that must be evaluated to set the
174
+ default value.</p>
175
+ </div></span>
176
+
177
+ </li>
178
+
179
+
180
+ <li class="public ">
181
+ <span class="summary_signature">
182
+
183
+ <a href="#indexed-instance_method" title="#indexed (instance method)">#<strong>indexed</strong> &#x21d2; Boolean </a>
184
+
185
+
186
+
187
+ </span>
188
+
189
+
190
+
191
+
192
+
193
+
194
+
195
+
196
+
197
+ <span class="private note title">private</span>
198
+
199
+
200
+ <span class="summary_desc"><div class='inline'>
201
+ <p>Returns true if this column is indexed.</p>
202
+ </div></span>
203
+
204
+ </li>
205
+
206
+
207
+ <li class="public ">
208
+ <span class="summary_signature">
209
+
210
+ <a href="#name-instance_method" title="#name (instance method)">#<strong>name</strong> &#x21d2; Symbol </a>
211
+
212
+
213
+
214
+ </span>
215
+
216
+
217
+
218
+
219
+ <span class="note title readonly">readonly</span>
220
+
221
+
222
+
223
+
224
+
225
+
226
+ <span class="private note title">private</span>
227
+
228
+
229
+ <span class="summary_desc"><div class='inline'>
230
+ <p>Column name.</p>
231
+ </div></span>
232
+
233
+ </li>
234
+
235
+
236
+ <li class="public ">
237
+ <span class="summary_signature">
238
+
239
+ <a href="#set_if-instance_method" title="#set_if (instance method)">#<strong>set_if</strong> &#x21d2; nil, ... </a>
240
+
241
+
242
+
243
+ </span>
244
+
245
+
246
+
247
+
248
+ <span class="note title readonly">readonly</span>
249
+
250
+
251
+
252
+
253
+
254
+
255
+ <span class="private note title">private</span>
256
+
257
+
258
+ <span class="summary_desc"><div class='inline'>
259
+ <p>Defined for columns of type :set, nil otherwise.</p>
260
+ </div></span>
261
+
262
+ </li>
263
+
264
+
265
+ <li class="public ">
266
+ <span class="summary_signature">
267
+
268
+ <a href="#type-instance_method" title="#type (instance method)">#<strong>type</strong> &#x21d2; Symbol </a>
269
+
270
+
271
+
272
+ </span>
273
+
274
+
275
+
276
+
277
+ <span class="note title readonly">readonly</span>
278
+
279
+
280
+
281
+
282
+
283
+
284
+ <span class="private note title">private</span>
285
+
286
+
287
+ <span class="summary_desc"><div class='inline'>
288
+ <p>Column type.</p>
289
+ </div></span>
290
+
291
+ </li>
292
+
293
+
294
+ </ul>
295
+
296
+
297
+
298
+
299
+
300
+ <h2>
301
+ Class Method Summary
302
+ <small><a href="#" class="summary_toggle">collapse</a></small>
303
+ </h2>
304
+
305
+ <ul class="summary">
306
+
307
+ <li class="public ">
308
+ <span class="summary_signature">
309
+
310
+ <a href="#create-class_method" title="create (class method)">.<strong>create</strong>(name:, type:) &#x21d2; Entry </a>
311
+
312
+
313
+
314
+ </span>
315
+
316
+
317
+
318
+
319
+
320
+
321
+ <span class="private note title">private</span>
322
+
323
+
324
+ <span class="summary_desc"><div class='inline'>
325
+ <p>Create a new column dictionary entry defaulting attributes from the column
326
+ type, which is looked up in the above table.</p>
327
+ </div></span>
328
+
329
+ </li>
330
+
331
+
332
+ </ul>
333
+
334
+ <h2>
335
+ Instance Method Summary
336
+ <small><a href="#" class="summary_toggle">collapse</a></small>
337
+ </h2>
338
+
339
+ <ul class="summary">
340
+
341
+ <li class="public ">
342
+ <span class="summary_signature">
343
+
344
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(name:, type:, eval: nil, set_if: nil, indexed: nil) &#x21d2; Entry </a>
345
+
346
+
347
+
348
+ </span>
349
+
350
+
351
+ <span class="note title constructor">constructor</span>
352
+
353
+
354
+
355
+
356
+
357
+ <span class="private note title">private</span>
358
+
359
+
360
+ <span class="summary_desc"><div class='inline'>
361
+ <p>A new instance of Entry.</p>
362
+ </div></span>
363
+
364
+ </li>
365
+
366
+
367
+ <li class="public ">
368
+ <span class="summary_signature">
369
+
370
+ <a href="#ins%3F-instance_method" title="#ins? (instance method)">#<strong>ins?</strong> &#x21d2; Boolean </a>
371
+
372
+
373
+
374
+ </span>
375
+
376
+
377
+
378
+
379
+
380
+
381
+ <span class="private note title">private</span>
382
+
383
+
384
+ <span class="summary_desc"><div class='inline'>
385
+ <p>Return true is this is an input column, false otherwise.</p>
386
+ </div></span>
387
+
388
+ </li>
389
+
390
+
391
+ <li class="public ">
392
+ <span class="summary_signature">
393
+
394
+ <a href="#to_h-instance_method" title="#to_h (instance method)">#<strong>to_h</strong> &#x21d2; Hash{Symbol=&gt;[nil, Boolean, Symbol]} </a>
395
+
396
+
397
+
398
+ </span>
399
+
400
+
401
+
402
+
403
+
404
+
405
+ <span class="private note title">private</span>
406
+
407
+
408
+ <span class="summary_desc"><div class='inline'>
409
+ <p>Convert the object&#39;s attributes to a hash.</p>
410
+ </div></span>
411
+
412
+ </li>
413
+
414
+
415
+ </ul>
416
+
417
+
418
+ <div id="constructor_details" class="method_details_list">
419
+ <h2>Constructor Details</h2>
420
+
421
+ <div class="method_details first">
422
+ <h3 class="signature first" id="initialize-instance_method">
423
+
424
+ #<strong>initialize</strong>(name:, type:, eval: nil, set_if: nil, indexed: nil) &#x21d2; <tt><span class='object_link'><a href="" title="CSVDecision::Dictionary::Entry (class)">Entry</a></span></tt>
425
+
426
+
427
+
428
+
429
+
430
+ </h3><div class="docstring">
431
+ <div class="discussion">
432
+ <p class="note private">
433
+ <strong>This method is part of a private API.</strong>
434
+ You should avoid using this method if possible, as it may be removed or be changed in the future.
435
+ </p>
436
+
437
+ <p>Returns a new instance of Entry</p>
438
+
439
+
440
+ </div>
441
+ </div>
442
+ <div class="tags">
443
+
444
+
445
+ </div><table class="source_code">
446
+ <tr>
447
+ <td>
448
+ <pre class="lines">
449
+
450
+
451
+ 92
452
+ 93
453
+ 94
454
+ 95
455
+ 96
456
+ 97
457
+ 98
458
+ 99
459
+ 100</pre>
460
+ </td>
461
+ <td>
462
+ <pre class="code"><span class="info file"># File 'lib/csv_decision/dictionary.rb', line 92</span>
463
+
464
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='label'>name:</span><span class='comma'>,</span> <span class='label'>type:</span><span class='comma'>,</span> <span class='label'>eval:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>set_if:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>indexed:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
465
+ <span class='ivar'>@name</span> <span class='op'>=</span> <span class='id identifier rubyid_name'>name</span>
466
+ <span class='ivar'>@type</span> <span class='op'>=</span> <span class='id identifier rubyid_type'>type</span>
467
+ <span class='ivar'>@eval</span> <span class='op'>=</span> <span class='id identifier rubyid_eval'>eval</span>
468
+ <span class='ivar'>@set_if</span> <span class='op'>=</span> <span class='id identifier rubyid_set_if'>set_if</span>
469
+ <span class='ivar'>@function</span> <span class='op'>=</span> <span class='kw'>nil</span>
470
+ <span class='ivar'>@ins</span> <span class='op'>=</span> <span class='const'>INS_TYPES</span><span class='period'>.</span><span class='id identifier rubyid_member?'>member?</span><span class='lparen'>(</span><span class='id identifier rubyid_type'>type</span><span class='rparen'>)</span>
471
+ <span class='ivar'>@indexed</span> <span class='op'>=</span> <span class='id identifier rubyid_indexed'>indexed</span>
472
+ <span class='kw'>end</span></pre>
473
+ </td>
474
+ </tr>
475
+ </table>
476
+ </div>
477
+
478
+ </div>
479
+
480
+ <div id="instance_attr_details" class="attr_details">
481
+ <h2>Instance Attribute Details</h2>
482
+
483
+
484
+ <span id="eval=-instance_method"></span>
485
+ <div class="method_details first">
486
+ <h3 class="signature first" id="eval-instance_method">
487
+
488
+ #<strong>eval</strong> &#x21d2; <tt>nil</tt>, <tt>Boolean</tt>
489
+
490
+
491
+
492
+
493
+
494
+ </h3><div class="docstring">
495
+ <div class="discussion">
496
+ <p class="note private">
497
+ <strong>This method is part of a private API.</strong>
498
+ You should avoid using this method if possible, as it may be removed or be changed in the future.
499
+ </p>
500
+
501
+ <p>Returns If set to true then this column has procs that need evaluating,
502
+ otherwise it only contains constants.</p>
503
+
504
+
505
+ </div>
506
+ </div>
507
+ <div class="tags">
508
+
509
+ <p class="tag_title">Returns:</p>
510
+ <ul class="return">
511
+
512
+ <li>
513
+
514
+
515
+ <span class='type'>(<tt>nil</tt>, <tt>Boolean</tt>)</span>
516
+
517
+
518
+
519
+ &mdash;
520
+ <div class='inline'>
521
+ <p>If set to true then this column has procs that need evaluating, otherwise
522
+ it only contains constants.</p>
523
+ </div>
524
+
525
+ </li>
526
+
527
+ </ul>
528
+
529
+ </div><table class="source_code">
530
+ <tr>
531
+ <td>
532
+ <pre class="lines">
533
+
534
+
535
+ 76
536
+ 77
537
+ 78</pre>
538
+ </td>
539
+ <td>
540
+ <pre class="code"><span class="info file"># File 'lib/csv_decision/dictionary.rb', line 76</span>
541
+
542
+ <span class='kw'>def</span> <span class='id identifier rubyid_eval'>eval</span>
543
+ <span class='ivar'>@eval</span>
544
+ <span class='kw'>end</span></pre>
545
+ </td>
546
+ </tr>
547
+ </table>
548
+ </div>
549
+
550
+
551
+ <span id="function=-instance_method"></span>
552
+ <div class="method_details ">
553
+ <h3 class="signature " id="function-instance_method">
554
+
555
+ #<strong>function</strong> &#x21d2; <tt><span class='object_link'><a href="../Matchers/Proc.html" title="CSVDecision::Matchers::Proc (class)">Matchers::Proc</a></span></tt>, <tt>Object</tt>
556
+
557
+
558
+
559
+
560
+
561
+ </h3><div class="docstring">
562
+ <div class="discussion">
563
+ <p class="note private">
564
+ <strong>This method is part of a private API.</strong>
565
+ You should avoid using this method if possible, as it may be removed or be changed in the future.
566
+ </p>
567
+
568
+ <p>Returns For a column of type set: gives the proc that must be evaluated to
569
+ set the default value. If not a proc, then it&#39;s some type of constant.</p>
570
+
571
+
572
+ </div>
573
+ </div>
574
+ <div class="tags">
575
+
576
+ <p class="tag_title">Returns:</p>
577
+ <ul class="return">
578
+
579
+ <li>
580
+
581
+
582
+ <span class='type'>(<tt><span class='object_link'><a href="../Matchers/Proc.html" title="CSVDecision::Matchers::Proc (class)">Matchers::Proc</a></span></tt>, <tt>Object</tt>)</span>
583
+
584
+
585
+
586
+ &mdash;
587
+ <div class='inline'>
588
+ <p>For a column of type set: gives the proc that must be evaluated to set the
589
+ default value. If not a proc, then it&#39;s some type of constant.</p>
590
+ </div>
591
+
592
+ </li>
593
+
594
+ </ul>
595
+
596
+ </div><table class="source_code">
597
+ <tr>
598
+ <td>
599
+ <pre class="lines">
600
+
601
+
602
+ 85
603
+ 86
604
+ 87</pre>
605
+ </td>
606
+ <td>
607
+ <pre class="code"><span class="info file"># File 'lib/csv_decision/dictionary.rb', line 85</span>
608
+
609
+ <span class='kw'>def</span> <span class='id identifier rubyid_function'>function</span>
610
+ <span class='ivar'>@function</span>
611
+ <span class='kw'>end</span></pre>
612
+ </td>
613
+ </tr>
614
+ </table>
615
+ </div>
616
+
617
+
618
+ <span id="indexed=-instance_method"></span>
619
+ <div class="method_details ">
620
+ <h3 class="signature " id="indexed-instance_method">
621
+
622
+ #<strong>indexed</strong> &#x21d2; <tt>Boolean</tt>
623
+
624
+
625
+
626
+
627
+
628
+ </h3><div class="docstring">
629
+ <div class="discussion">
630
+ <p class="note private">
631
+ <strong>This method is part of a private API.</strong>
632
+ You should avoid using this method if possible, as it may be removed or be changed in the future.
633
+ </p>
634
+
635
+ <p>Returns true if this column is indexed</p>
636
+
637
+
638
+ </div>
639
+ </div>
640
+ <div class="tags">
641
+
642
+ <p class="tag_title">Returns:</p>
643
+ <ul class="return">
644
+
645
+ <li>
646
+
647
+
648
+ <span class='type'>(<tt>Boolean</tt>)</span>
649
+
650
+
651
+
652
+ &mdash;
653
+ <div class='inline'>
654
+ <p>Returns true if this column is indexed</p>
655
+ </div>
656
+
657
+ </li>
658
+
659
+ </ul>
660
+
661
+ </div><table class="source_code">
662
+ <tr>
663
+ <td>
664
+ <pre class="lines">
665
+
666
+
667
+ 72
668
+ 73
669
+ 74</pre>
670
+ </td>
671
+ <td>
672
+ <pre class="code"><span class="info file"># File 'lib/csv_decision/dictionary.rb', line 72</span>
673
+
674
+ <span class='kw'>def</span> <span class='id identifier rubyid_indexed'>indexed</span>
675
+ <span class='ivar'>@indexed</span>
676
+ <span class='kw'>end</span></pre>
677
+ </td>
678
+ </tr>
679
+ </table>
680
+ </div>
681
+
682
+
683
+ <span id=""></span>
684
+ <div class="method_details ">
685
+ <h3 class="signature " id="name-instance_method">
686
+
687
+ #<strong>name</strong> &#x21d2; <tt>Symbol</tt> <span class="extras">(readonly)</span>
688
+
689
+
690
+
691
+
692
+
693
+ </h3><div class="docstring">
694
+ <div class="discussion">
695
+ <p class="note private">
696
+ <strong>This method is part of a private API.</strong>
697
+ You should avoid using this method if possible, as it may be removed or be changed in the future.
698
+ </p>
699
+
700
+ <p>Returns Column name.</p>
701
+
702
+
703
+ </div>
704
+ </div>
705
+ <div class="tags">
706
+
707
+ <p class="tag_title">Returns:</p>
708
+ <ul class="return">
709
+
710
+ <li>
711
+
712
+
713
+ <span class='type'>(<tt>Symbol</tt>)</span>
714
+
715
+
716
+
717
+ &mdash;
718
+ <div class='inline'>
719
+ <p>Column name.</p>
720
+ </div>
721
+
722
+ </li>
723
+
724
+ </ul>
725
+
726
+ </div><table class="source_code">
727
+ <tr>
728
+ <td>
729
+ <pre class="lines">
730
+
731
+
732
+ 66
733
+ 67
734
+ 68</pre>
735
+ </td>
736
+ <td>
737
+ <pre class="code"><span class="info file"># File 'lib/csv_decision/dictionary.rb', line 66</span>
738
+
739
+ <span class='kw'>def</span> <span class='id identifier rubyid_name'>name</span>
740
+ <span class='ivar'>@name</span>
741
+ <span class='kw'>end</span></pre>
742
+ </td>
743
+ </tr>
744
+ </table>
745
+ </div>
746
+
747
+
748
+ <span id=""></span>
749
+ <div class="method_details ">
750
+ <h3 class="signature " id="set_if-instance_method">
751
+
752
+ #<strong>set_if</strong> &#x21d2; <tt>nil</tt>, ... <span class="extras">(readonly)</span>
753
+
754
+
755
+
756
+
757
+
758
+ </h3><div class="docstring">
759
+ <div class="discussion">
760
+ <p class="note private">
761
+ <strong>This method is part of a private API.</strong>
762
+ You should avoid using this method if possible, as it may be removed or be changed in the future.
763
+ </p>
764
+
765
+ <p>Returns Defined for columns of type :set, nil otherwise. If true, then
766
+ default is set unconditionally, otherwise the method symbol sent to the
767
+ input hash value that must evaluate to a truthy value.</p>
768
+
769
+
770
+ </div>
771
+ </div>
772
+ <div class="tags">
773
+
774
+ <p class="tag_title">Returns:</p>
775
+ <ul class="return">
776
+
777
+ <li>
778
+
779
+
780
+ <span class='type'>(<tt>nil</tt>, <tt>true</tt>, <tt>Symbol</tt>)</span>
781
+
782
+
783
+
784
+ &mdash;
785
+ <div class='inline'>
786
+ <p>Defined for columns of type :set, nil otherwise. If true, then default is
787
+ set unconditionally, otherwise the method symbol sent to the input hash
788
+ value that must evaluate to a truthy value.</p>
789
+ </div>
790
+
791
+ </li>
792
+
793
+ </ul>
794
+
795
+ </div><table class="source_code">
796
+ <tr>
797
+ <td>
798
+ <pre class="lines">
799
+
800
+
801
+ 81
802
+ 82
803
+ 83</pre>
804
+ </td>
805
+ <td>
806
+ <pre class="code"><span class="info file"># File 'lib/csv_decision/dictionary.rb', line 81</span>
807
+
808
+ <span class='kw'>def</span> <span class='id identifier rubyid_set_if'>set_if</span>
809
+ <span class='ivar'>@set_if</span>
810
+ <span class='kw'>end</span></pre>
811
+ </td>
812
+ </tr>
813
+ </table>
814
+ </div>
815
+
816
+
817
+ <span id=""></span>
818
+ <div class="method_details ">
819
+ <h3 class="signature " id="type-instance_method">
820
+
821
+ #<strong>type</strong> &#x21d2; <tt>Symbol</tt> <span class="extras">(readonly)</span>
822
+
823
+
824
+
825
+
826
+
827
+ </h3><div class="docstring">
828
+ <div class="discussion">
829
+ <p class="note private">
830
+ <strong>This method is part of a private API.</strong>
831
+ You should avoid using this method if possible, as it may be removed or be changed in the future.
832
+ </p>
833
+
834
+ <p>Returns Column type.</p>
835
+
836
+
837
+ </div>
838
+ </div>
839
+ <div class="tags">
840
+
841
+ <p class="tag_title">Returns:</p>
842
+ <ul class="return">
843
+
844
+ <li>
845
+
846
+
847
+ <span class='type'>(<tt>Symbol</tt>)</span>
848
+
849
+
850
+
851
+ &mdash;
852
+ <div class='inline'>
853
+ <p>Column type.</p>
854
+ </div>
855
+
856
+ </li>
857
+
858
+ </ul>
859
+
860
+ </div><table class="source_code">
861
+ <tr>
862
+ <td>
863
+ <pre class="lines">
864
+
865
+
866
+ 69
867
+ 70
868
+ 71</pre>
869
+ </td>
870
+ <td>
871
+ <pre class="code"><span class="info file"># File 'lib/csv_decision/dictionary.rb', line 69</span>
872
+
873
+ <span class='kw'>def</span> <span class='id identifier rubyid_type'>type</span>
874
+ <span class='ivar'>@type</span>
875
+ <span class='kw'>end</span></pre>
876
+ </td>
877
+ </tr>
878
+ </table>
879
+ </div>
880
+
881
+ </div>
882
+
883
+
884
+ <div id="class_method_details" class="method_details_list">
885
+ <h2>Class Method Details</h2>
886
+
887
+
888
+ <div class="method_details first">
889
+ <h3 class="signature first" id="create-class_method">
890
+
891
+ .<strong>create</strong>(name:, type:) &#x21d2; <tt><span class='object_link'><a href="" title="CSVDecision::Dictionary::Entry (class)">Entry</a></span></tt>
892
+
893
+
894
+
895
+
896
+
897
+ </h3><div class="docstring">
898
+ <div class="discussion">
899
+ <p class="note private">
900
+ <strong>This method is part of a private API.</strong>
901
+ You should avoid using this method if possible, as it may be removed or be changed in the future.
902
+ </p>
903
+
904
+ <p>Create a new column dictionary entry defaulting attributes from the column
905
+ type, which is looked up in the above table.</p>
906
+
907
+
908
+ </div>
909
+ </div>
910
+ <div class="tags">
911
+ <p class="tag_title">Parameters:</p>
912
+ <ul class="param">
913
+
914
+ <li>
915
+
916
+ <span class='name'>name</span>
917
+
918
+
919
+ <span class='type'>(<tt>Symbol</tt>)</span>
920
+
921
+
922
+
923
+ &mdash;
924
+ <div class='inline'>
925
+ <p>Column name.</p>
926
+ </div>
927
+
928
+ </li>
929
+
930
+ <li>
931
+
932
+ <span class='name'>type</span>
933
+
934
+
935
+ <span class='type'>(<tt>Symbol</tt>)</span>
936
+
937
+
938
+
939
+ &mdash;
940
+ <div class='inline'>
941
+ <p>Column type.</p>
942
+ </div>
943
+
944
+ </li>
945
+
946
+ </ul>
947
+
948
+ <p class="tag_title">Returns:</p>
949
+ <ul class="return">
950
+
951
+ <li>
952
+
953
+
954
+ <span class='type'>(<tt><span class='object_link'><a href="" title="CSVDecision::Dictionary::Entry (class)">Entry</a></span></tt>)</span>
955
+
956
+
957
+
958
+ &mdash;
959
+ <div class='inline'>
960
+ <p>Column dictionary entry.</p>
961
+ </div>
962
+
963
+ </li>
964
+
965
+ </ul>
966
+
967
+ </div><table class="source_code">
968
+ <tr>
969
+ <td>
970
+ <pre class="lines">
971
+
972
+
973
+ 51
974
+ 52
975
+ 53
976
+ 54
977
+ 55
978
+ 56
979
+ 57
980
+ 58</pre>
981
+ </td>
982
+ <td>
983
+ <pre class="code"><span class="info file"># File 'lib/csv_decision/dictionary.rb', line 51</span>
984
+
985
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_create'>create</span><span class='lparen'>(</span><span class='label'>name:</span><span class='comma'>,</span> <span class='label'>type:</span><span class='rparen'>)</span>
986
+ <span class='id identifier rubyid_entry'>entry</span> <span class='op'>=</span> <span class='const'>ENTRY</span><span class='lbracket'>[</span><span class='id identifier rubyid_type'>type</span><span class='rbracket'>]</span>
987
+ <span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='label'>name:</span> <span class='id identifier rubyid_name'>name</span><span class='comma'>,</span>
988
+ <span class='label'>eval:</span> <span class='id identifier rubyid_entry'>entry</span><span class='lbracket'>[</span><span class='symbol'>:eval</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='comment'># Set if the column requires functions evaluated
989
+ </span> <span class='label'>type:</span> <span class='id identifier rubyid_entry'>entry</span><span class='lbracket'>[</span><span class='symbol'>:type</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='comment'># Column type
990
+ </span> <span class='label'>set_if:</span> <span class='id identifier rubyid_entry'>entry</span><span class='lbracket'>[</span><span class='symbol'>:set_if</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='comment'># Set if the column has a conditional default
991
+ </span> <span class='label'>indexed:</span> <span class='id identifier rubyid_entry'>entry</span><span class='lbracket'>[</span><span class='symbol'>:type</span><span class='rbracket'>]</span> <span class='op'>!=</span> <span class='symbol'>:guard</span><span class='rparen'>)</span> <span class='comment'># A guard column cannot be indexed.
992
+ </span><span class='kw'>end</span></pre>
993
+ </td>
994
+ </tr>
995
+ </table>
996
+ </div>
997
+
998
+ </div>
999
+
1000
+ <div id="instance_method_details" class="method_details_list">
1001
+ <h2>Instance Method Details</h2>
1002
+
1003
+
1004
+ <div class="method_details first">
1005
+ <h3 class="signature first" id="ins?-instance_method">
1006
+
1007
+ #<strong>ins?</strong> &#x21d2; <tt>Boolean</tt>
1008
+
1009
+
1010
+
1011
+
1012
+
1013
+ </h3><div class="docstring">
1014
+ <div class="discussion">
1015
+ <p class="note private">
1016
+ <strong>This method is part of a private API.</strong>
1017
+ You should avoid using this method if possible, as it may be removed or be changed in the future.
1018
+ </p>
1019
+
1020
+ <p>Return true is this is an input column, false otherwise.</p>
1021
+
1022
+
1023
+ </div>
1024
+ </div>
1025
+ <div class="tags">
1026
+
1027
+ <p class="tag_title">Returns:</p>
1028
+ <ul class="return">
1029
+
1030
+ <li>
1031
+
1032
+
1033
+ <span class='type'>(<tt>Boolean</tt>)</span>
1034
+
1035
+
1036
+
1037
+ &mdash;
1038
+ <div class='inline'>
1039
+ <p>Return true is this is an input column, false otherwise.</p>
1040
+ </div>
1041
+
1042
+ </li>
1043
+
1044
+ </ul>
1045
+
1046
+ </div><table class="source_code">
1047
+ <tr>
1048
+ <td>
1049
+ <pre class="lines">
1050
+
1051
+
1052
+ 61
1053
+ 62
1054
+ 63</pre>
1055
+ </td>
1056
+ <td>
1057
+ <pre class="code"><span class="info file"># File 'lib/csv_decision/dictionary.rb', line 61</span>
1058
+
1059
+ <span class='kw'>def</span> <span class='id identifier rubyid_ins?'>ins?</span>
1060
+ <span class='ivar'>@ins</span>
1061
+ <span class='kw'>end</span></pre>
1062
+ </td>
1063
+ </tr>
1064
+ </table>
1065
+ </div>
1066
+
1067
+ <div class="method_details ">
1068
+ <h3 class="signature " id="to_h-instance_method">
1069
+
1070
+ #<strong>to_h</strong> &#x21d2; <tt>Hash{Symbol=&gt;[nil, Boolean, Symbol]}</tt>
1071
+
1072
+
1073
+
1074
+
1075
+
1076
+ </h3><div class="docstring">
1077
+ <div class="discussion">
1078
+ <p class="note private">
1079
+ <strong>This method is part of a private API.</strong>
1080
+ You should avoid using this method if possible, as it may be removed or be changed in the future.
1081
+ </p>
1082
+
1083
+ <p>Convert the object&#39;s attributes to a hash.</p>
1084
+
1085
+
1086
+ </div>
1087
+ </div>
1088
+ <div class="tags">
1089
+
1090
+ <p class="tag_title">Returns:</p>
1091
+ <ul class="return">
1092
+
1093
+ <li>
1094
+
1095
+
1096
+ <span class='type'>(<tt>Hash{Symbol=&gt;[nil, Boolean, Symbol]}</tt>)</span>
1097
+
1098
+
1099
+
1100
+ </li>
1101
+
1102
+ </ul>
1103
+
1104
+ </div><table class="source_code">
1105
+ <tr>
1106
+ <td>
1107
+ <pre class="lines">
1108
+
1109
+
1110
+ 105
1111
+ 106
1112
+ 107
1113
+ 108
1114
+ 109
1115
+ 110
1116
+ 111
1117
+ 112</pre>
1118
+ </td>
1119
+ <td>
1120
+ <pre class="code"><span class="info file"># File 'lib/csv_decision/dictionary.rb', line 105</span>
1121
+
1122
+ <span class='kw'>def</span> <span class='id identifier rubyid_to_h'>to_h</span>
1123
+ <span class='lbrace'>{</span>
1124
+ <span class='label'>name:</span> <span class='ivar'>@name</span><span class='comma'>,</span>
1125
+ <span class='label'>type:</span> <span class='ivar'>@type</span><span class='comma'>,</span>
1126
+ <span class='label'>eval:</span> <span class='ivar'>@eval</span><span class='comma'>,</span>
1127
+ <span class='label'>set_if:</span> <span class='ivar'>@set_if</span>
1128
+ <span class='rbrace'>}</span>
1129
+ <span class='kw'>end</span></pre>
1130
+ </td>
1131
+ </tr>
1132
+ </table>
1133
+ </div>
1134
+
1135
+ </div>
1136
+
1137
+ </div>
1138
+
1139
+ <div id="footer">
1140
+ Generated on Sun Feb 11 10:26:09 2018 by
1141
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1142
+ 0.9.12 (ruby-2.4.0).
1143
+ </div>
1144
+
1145
+ </div>
1146
+ </body>
1147
+ </html>