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,369 @@
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::Scan::InputHashes
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::Scan::InputHashes";
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 (I)</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="../Scan.html" title="CSVDecision::Scan (class)">Scan</a></span></span>
41
+ &raquo;
42
+ <span class="title">InputHashes</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::Scan::InputHashes
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::Scan::InputHashes</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/scan.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>Derive the parsed input hash, using a cache for speed.</p>
110
+
111
+
112
+ </div>
113
+ </div>
114
+ <div class="tags">
115
+
116
+
117
+ </div>
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+ <h2>
126
+ Instance Method Summary
127
+ <small><a href="#" class="summary_toggle">collapse</a></small>
128
+ </h2>
129
+
130
+ <ul class="summary">
131
+
132
+ <li class="public ">
133
+ <span class="summary_signature">
134
+
135
+ <a href="#data-instance_method" title="#data (instance method)">#<strong>data</strong>(table:, path:, input:) &#x21d2; Hash{Symbol=&gt;Object} </a>
136
+
137
+
138
+
139
+ </span>
140
+
141
+
142
+
143
+
144
+
145
+
146
+ <span class="private note title">private</span>
147
+
148
+
149
+ <span class="summary_desc"><div class='inline'>
150
+ <p>Parsed input hash.</p>
151
+ </div></span>
152
+
153
+ </li>
154
+
155
+
156
+ <li class="public ">
157
+ <span class="summary_signature">
158
+
159
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong> &#x21d2; InputHashes </a>
160
+
161
+
162
+
163
+ </span>
164
+
165
+
166
+ <span class="note title constructor">constructor</span>
167
+
168
+
169
+
170
+
171
+
172
+ <span class="private note title">private</span>
173
+
174
+
175
+ <span class="summary_desc"><div class='inline'>
176
+ <p>A new instance of InputHashes.</p>
177
+ </div></span>
178
+
179
+ </li>
180
+
181
+
182
+ </ul>
183
+
184
+
185
+ <div id="constructor_details" class="method_details_list">
186
+ <h2>Constructor Details</h2>
187
+
188
+ <div class="method_details first">
189
+ <h3 class="signature first" id="initialize-instance_method">
190
+
191
+ #<strong>initialize</strong> &#x21d2; <tt><span class='object_link'><a href="" title="CSVDecision::Scan::InputHashes (class)">InputHashes</a></span></tt>
192
+
193
+
194
+
195
+
196
+
197
+ </h3><div class="docstring">
198
+ <div class="discussion">
199
+ <p class="note private">
200
+ <strong>This method is part of a private API.</strong>
201
+ You should avoid using this method if possible, as it may be removed or be changed in the future.
202
+ </p>
203
+
204
+ <p>Returns a new instance of InputHashes</p>
205
+
206
+
207
+ </div>
208
+ </div>
209
+ <div class="tags">
210
+
211
+
212
+ </div><table class="source_code">
213
+ <tr>
214
+ <td>
215
+ <pre class="lines">
216
+
217
+
218
+ 71
219
+ 72
220
+ 73</pre>
221
+ </td>
222
+ <td>
223
+ <pre class="code"><span class="info file"># File 'lib/csv_decision/scan.rb', line 71</span>
224
+
225
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
226
+ <span class='ivar'>@input_hashes</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
227
+ <span class='kw'>end</span></pre>
228
+ </td>
229
+ </tr>
230
+ </table>
231
+ </div>
232
+
233
+ </div>
234
+
235
+
236
+ <div id="instance_method_details" class="method_details_list">
237
+ <h2>Instance Method Details</h2>
238
+
239
+
240
+ <div class="method_details first">
241
+ <h3 class="signature first" id="data-instance_method">
242
+
243
+ #<strong>data</strong>(table:, path:, input:) &#x21d2; <tt>Hash{Symbol=&gt;Object}</tt>
244
+
245
+
246
+
247
+
248
+
249
+ </h3><div class="docstring">
250
+ <div class="discussion">
251
+ <p class="note private">
252
+ <strong>This method is part of a private API.</strong>
253
+ You should avoid using this method if possible, as it may be removed or be changed in the future.
254
+ </p>
255
+
256
+ <p>Returns Parsed input hash.</p>
257
+
258
+
259
+ </div>
260
+ </div>
261
+ <div class="tags">
262
+ <p class="tag_title">Parameters:</p>
263
+ <ul class="param">
264
+
265
+ <li>
266
+
267
+ <span class='name'>path</span>
268
+
269
+
270
+ <span class='type'>(<tt>Array&lt;Symbol] Path for the input hash.</tt>)</span>
271
+
272
+
273
+
274
+ &mdash;
275
+ <div class='inline'>
276
+ <p>ath [Array&lt;Symbol] Path for the input hash.</p>
277
+ </div>
278
+
279
+ </li>
280
+
281
+ <li>
282
+
283
+ <span class='name'>input</span>
284
+
285
+
286
+ <span class='type'>(<tt>Hash{Symbol=&gt;Object}</tt>)</span>
287
+
288
+
289
+
290
+ &mdash;
291
+ <div class='inline'>
292
+ <p>Input hash.</p>
293
+ </div>
294
+
295
+ </li>
296
+
297
+ </ul>
298
+
299
+ <p class="tag_title">Returns:</p>
300
+ <ul class="return">
301
+
302
+ <li>
303
+
304
+
305
+ <span class='type'>(<tt>Hash{Symbol=&gt;Object}</tt>)</span>
306
+
307
+
308
+
309
+ &mdash;
310
+ <div class='inline'>
311
+ <p>Parsed input hash.</p>
312
+ </div>
313
+
314
+ </li>
315
+
316
+ </ul>
317
+
318
+ </div><table class="source_code">
319
+ <tr>
320
+ <td>
321
+ <pre class="lines">
322
+
323
+
324
+ 78
325
+ 79
326
+ 80
327
+ 81
328
+ 82
329
+ 83
330
+ 84
331
+ 85
332
+ 86
333
+ 87
334
+ 88
335
+ 89</pre>
336
+ </td>
337
+ <td>
338
+ <pre class="code"><span class="info file"># File 'lib/csv_decision/scan.rb', line 78</span>
339
+
340
+ <span class='kw'>def</span> <span class='id identifier rubyid_data'>data</span><span class='lparen'>(</span><span class='label'>table:</span><span class='comma'>,</span> <span class='label'>path:</span><span class='comma'>,</span> <span class='label'>input:</span><span class='rparen'>)</span>
341
+ <span class='kw'>return</span> <span class='ivar'>@input_hashes</span><span class='lbracket'>[</span><span class='id identifier rubyid_path'>path</span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='ivar'>@input_hashes</span><span class='period'>.</span><span class='id identifier rubyid_key?'>key?</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span>
342
+
343
+ <span class='comment'># Use the path - an array of symbol keys, to dig out the input sub-hash
344
+ </span> <span class='id identifier rubyid_hash'>hash</span> <span class='op'>=</span> <span class='id identifier rubyid_path'>path</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span> <span class='op'>?</span> <span class='id identifier rubyid_input'>input</span> <span class='op'>:</span> <span class='id identifier rubyid_input'>input</span><span class='period'>.</span><span class='id identifier rubyid_dig'>dig</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span>
345
+
346
+ <span class='comment'># Parse and transform the hash supplied as input
347
+ </span> <span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='id identifier rubyid_hash'>hash</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span> <span class='op'>?</span> <span class='lbrace'>{</span><span class='rbrace'>}</span> <span class='op'>:</span> <span class='const'><span class='object_link'><a href="../Input.html" title="CSVDecision::Input (module)">Input</a></span></span><span class='period'>.</span><span class='id identifier rubyid_parse_data'><span class='object_link'><a href="../Input.html#parse_data-class_method" title="CSVDecision::Input.parse_data (method)">parse_data</a></span></span><span class='lparen'>(</span><span class='label'>table:</span> <span class='id identifier rubyid_table'>table</span><span class='comma'>,</span> <span class='label'>input:</span> <span class='id identifier rubyid_hash'>hash</span><span class='rparen'>)</span>
348
+
349
+ <span class='comment'># Cache the parsed input hash data for this path
350
+ </span> <span class='ivar'>@input_hashes</span><span class='lbracket'>[</span><span class='id identifier rubyid_path'>path</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_data'>data</span>
351
+ <span class='kw'>end</span></pre>
352
+ </td>
353
+ </tr>
354
+ </table>
355
+ </div>
356
+
357
+ </div>
358
+
359
+ </div>
360
+
361
+ <div id="footer">
362
+ Generated on Sun Feb 11 10:26:07 2018 by
363
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
364
+ 0.9.12 (ruby-2.4.0).
365
+ </div>
366
+
367
+ </div>
368
+ </body>
369
+ </html>
@@ -0,0 +1,313 @@
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::Scan
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::Scan";
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 (S)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../CSVDecision.html" title="CSVDecision (module)">CSVDecision</a></span></span>
41
+ &raquo;
42
+ <span class="title">Scan</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::Scan
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::Scan</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/scan.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>Scan the input hash for all the paths specified in the decision table</p>
110
+
111
+
112
+ </div>
113
+ </div>
114
+ <div class="tags">
115
+
116
+
117
+ </div><h2>Defined Under Namespace</h2>
118
+ <p class="children">
119
+
120
+
121
+
122
+
123
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="Scan/InputHashes.html" title="CSVDecision::Scan::InputHashes (class)">InputHashes</a></span>
124
+
125
+
126
+ </p>
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+ <h2>
136
+ Class Method Summary
137
+ <small><a href="#" class="summary_toggle">collapse</a></small>
138
+ </h2>
139
+
140
+ <ul class="summary">
141
+
142
+ <li class="public ">
143
+ <span class="summary_signature">
144
+
145
+ <a href="#table-class_method" title="table (class method)">.<strong>table</strong>(table:, input:, symbolize_keys:) &#x21d2; Hash{Symbol=&gt;Object} </a>
146
+
147
+
148
+
149
+ </span>
150
+
151
+
152
+
153
+
154
+
155
+
156
+ <span class="private note title">private</span>
157
+
158
+
159
+ <span class="summary_desc"><div class='inline'>
160
+ <p>Main method for making decisions with a table that has paths.</p>
161
+ </div></span>
162
+
163
+ </li>
164
+
165
+
166
+ </ul>
167
+
168
+
169
+
170
+
171
+ <div id="class_method_details" class="method_details_list">
172
+ <h2>Class Method Details</h2>
173
+
174
+
175
+ <div class="method_details first">
176
+ <h3 class="signature first" id="table-class_method">
177
+
178
+ .<strong>table</strong>(table:, input:, symbolize_keys:) &#x21d2; <tt>Hash{Symbol=&gt;Object}</tt>
179
+
180
+
181
+
182
+
183
+
184
+ </h3><div class="docstring">
185
+ <div class="discussion">
186
+ <p class="note private">
187
+ <strong>This method is part of a private API.</strong>
188
+ You should avoid using this method if possible, as it may be removed or be changed in the future.
189
+ </p>
190
+
191
+ <p>Main method for making decisions with a table that has paths.</p>
192
+
193
+
194
+ </div>
195
+ </div>
196
+ <div class="tags">
197
+ <p class="tag_title">Parameters:</p>
198
+ <ul class="param">
199
+
200
+ <li>
201
+
202
+ <span class='name'>table</span>
203
+
204
+
205
+ <span class='type'>(<tt><span class='object_link'><a href="Table.html" title="CSVDecision::Table (class)">CSVDecision::Table</a></span></tt>)</span>
206
+
207
+
208
+
209
+ &mdash;
210
+ <div class='inline'>
211
+ <p>Decision table.</p>
212
+ </div>
213
+
214
+ </li>
215
+
216
+ <li>
217
+
218
+ <span class='name'>input</span>
219
+
220
+
221
+ <span class='type'>(<tt>Hash</tt>)</span>
222
+
223
+
224
+
225
+ &mdash;
226
+ <div class='inline'>
227
+ <p>Input hash (keys may or may not be symbolized)</p>
228
+ </div>
229
+
230
+ </li>
231
+
232
+ <li>
233
+
234
+ <span class='name'>symbolize_keys</span>
235
+
236
+
237
+ <span class='type'>(<tt>Boolean</tt>)</span>
238
+
239
+
240
+
241
+ &mdash;
242
+ <div class='inline'>
243
+ <p>Set to false if keys are symbolized and it&#39;s OK to mutate the input
244
+ hash. Otherwise a copy of the input hash is symbolized.</p>
245
+ </div>
246
+
247
+ </li>
248
+
249
+ </ul>
250
+
251
+ <p class="tag_title">Returns:</p>
252
+ <ul class="return">
253
+
254
+ <li>
255
+
256
+
257
+ <span class='type'>(<tt>Hash{Symbol=&gt;Object}</tt>)</span>
258
+
259
+
260
+
261
+ &mdash;
262
+ <div class='inline'>
263
+ <p>Decision result.</p>
264
+ </div>
265
+
266
+ </li>
267
+
268
+ </ul>
269
+
270
+ </div><table class="source_code">
271
+ <tr>
272
+ <td>
273
+ <pre class="lines">
274
+
275
+
276
+ 18
277
+ 19
278
+ 20
279
+ 21
280
+ 22
281
+ 23
282
+ 24
283
+ 25</pre>
284
+ </td>
285
+ <td>
286
+ <pre class="code"><span class="info file"># File 'lib/csv_decision/scan.rb', line 18</span>
287
+
288
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_table'>table</span><span class='lparen'>(</span><span class='label'>table:</span><span class='comma'>,</span> <span class='label'>input:</span><span class='comma'>,</span> <span class='label'>symbolize_keys:</span><span class='rparen'>)</span>
289
+ <span class='id identifier rubyid_scan_table'>scan_table</span><span class='lparen'>(</span>
290
+ <span class='label'>table:</span> <span class='id identifier rubyid_table'>table</span><span class='comma'>,</span>
291
+ <span class='label'>input:</span> <span class='id identifier rubyid_symbolize_keys'>symbolize_keys</span> <span class='op'>?</span> <span class='id identifier rubyid_input'>input</span><span class='period'>.</span><span class='id identifier rubyid_deep_symbolize_keys'>deep_symbolize_keys</span> <span class='op'>:</span> <span class='id identifier rubyid_input'>input</span><span class='comma'>,</span>
292
+ <span class='label'>decision:</span> <span class='const'><span class='object_link'><a href="Decision.html" title="CSVDecision::Decision (class)">Decision</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Decision.html#initialize-instance_method" title="CSVDecision::Decision#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='label'>table:</span> <span class='id identifier rubyid_table'>table</span><span class='rparen'>)</span><span class='comma'>,</span>
293
+ <span class='label'>input_hashes:</span> <span class='const'><span class='object_link'><a href="Scan/InputHashes.html" title="CSVDecision::Scan::InputHashes (class)">InputHashes</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Scan/InputHashes.html#initialize-instance_method" title="CSVDecision::Scan::InputHashes#initialize (method)">new</a></span></span>
294
+ <span class='rparen'>)</span>
295
+ <span class='kw'>end</span></pre>
296
+ </td>
297
+ </tr>
298
+ </table>
299
+ </div>
300
+
301
+ </div>
302
+
303
+ </div>
304
+
305
+ <div id="footer">
306
+ Generated on Sun Feb 11 10:26:07 2018 by
307
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
308
+ 0.9.12 (ruby-2.4.0).
309
+ </div>
310
+
311
+ </div>
312
+ </body>
313
+ </html>