csv_decision2 0.5.1 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. checksums.yaml +4 -4
  2. data/Dockerfile +1 -1
  3. data/README.md +16 -16
  4. data/benchmarks/rufus_decision.rb +5 -7
  5. data/csv_decision2.gemspec +2 -2
  6. data/doc/CSVDecision/CellValidationError.html +117 -110
  7. data/doc/CSVDecision/Columns/Default.html +537 -508
  8. data/doc/CSVDecision/Columns/Dictionary.html +729 -686
  9. data/doc/CSVDecision/Columns/Entry.html +457 -433
  10. data/doc/CSVDecision/Columns.html +1134 -1051
  11. data/doc/CSVDecision/Constant.html +205 -191
  12. data/doc/CSVDecision/Data.html +423 -398
  13. data/doc/CSVDecision/Decide.html +236 -225
  14. data/doc/CSVDecision/Decision.html +872 -825
  15. data/doc/CSVDecision/Defaults.html +243 -230
  16. data/doc/CSVDecision/Dictionary/Entry.html +1026 -964
  17. data/doc/CSVDecision/Dictionary.html +377 -355
  18. data/doc/CSVDecision/Error.html +116 -105
  19. data/doc/CSVDecision/FileError.html +117 -110
  20. data/doc/CSVDecision/Function.html +181 -168
  21. data/doc/CSVDecision/Guard.html +200 -185
  22. data/doc/CSVDecision/Header.html +557 -523
  23. data/doc/CSVDecision/Index.html +652 -617
  24. data/doc/CSVDecision/Input.html +329 -312
  25. data/doc/CSVDecision/Load.html +232 -220
  26. data/doc/CSVDecision/Matchers/Constant.html +432 -399
  27. data/doc/CSVDecision/Matchers/Function.html +451 -415
  28. data/doc/CSVDecision/Matchers/Guard.html +459 -424
  29. data/doc/CSVDecision/Matchers/Matcher.html +470 -426
  30. data/doc/CSVDecision/Matchers/Numeric.html +375 -346
  31. data/doc/CSVDecision/Matchers/Pattern.html +429 -396
  32. data/doc/CSVDecision/Matchers/Proc.html +617 -575
  33. data/doc/CSVDecision/Matchers/Range.html +331 -302
  34. data/doc/CSVDecision/Matchers/Symbol.html +386 -353
  35. data/doc/CSVDecision/Matchers.html +1509 -1393
  36. data/doc/CSVDecision/Numeric.html +201 -188
  37. data/doc/CSVDecision/Options.html +376 -357
  38. data/doc/CSVDecision/Parse.html +217 -204
  39. data/doc/CSVDecision/Paths.html +664 -629
  40. data/doc/CSVDecision/Result.html +1076 -1005
  41. data/doc/CSVDecision/Scan/InputHashes.html +305 -288
  42. data/doc/CSVDecision/Scan.html +262 -249
  43. data/doc/CSVDecision/ScanRow.html +749 -705
  44. data/doc/CSVDecision/Symbol.html +204 -191
  45. data/doc/CSVDecision/Table.html +1391 -1305
  46. data/doc/CSVDecision/TableValidationError.html +117 -110
  47. data/doc/CSVDecision/Validate.html +353 -337
  48. data/doc/CSVDecision.html +623 -552
  49. data/doc/_index.html +488 -448
  50. data/doc/class_list.html +250 -45
  51. data/doc/file.README.html +304 -278
  52. data/doc/index.html +304 -278
  53. data/doc/method_list.html +1159 -1017
  54. data/doc/top-level-namespace.html +79 -75
  55. data/lib/{csv_decision → csv_decision2}/columns.rb +7 -7
  56. data/lib/{csv_decision → csv_decision2}/data.rb +1 -1
  57. data/lib/{csv_decision → csv_decision2}/decision.rb +5 -5
  58. data/lib/{csv_decision → csv_decision2}/defaults.rb +2 -2
  59. data/lib/{csv_decision → csv_decision2}/dictionary.rb +2 -2
  60. data/lib/{csv_decision → csv_decision2}/header.rb +5 -5
  61. data/lib/{csv_decision → csv_decision2}/index.rb +5 -5
  62. data/lib/{csv_decision → csv_decision2}/input.rb +3 -3
  63. data/lib/{csv_decision → csv_decision2}/load.rb +6 -6
  64. data/lib/{csv_decision → csv_decision2}/matchers/constant.rb +2 -2
  65. data/lib/{csv_decision → csv_decision2}/matchers/function.rb +2 -2
  66. data/lib/{csv_decision → csv_decision2}/matchers/guard.rb +2 -2
  67. data/lib/{csv_decision → csv_decision2}/matchers/numeric.rb +2 -2
  68. data/lib/{csv_decision → csv_decision2}/matchers/pattern.rb +2 -2
  69. data/lib/{csv_decision → csv_decision2}/matchers/range.rb +2 -2
  70. data/lib/{csv_decision → csv_decision2}/matchers/symbol.rb +2 -2
  71. data/lib/{csv_decision → csv_decision2}/matchers.rb +5 -5
  72. data/lib/{csv_decision → csv_decision2}/options.rb +3 -3
  73. data/lib/{csv_decision → csv_decision2}/parse.rb +14 -14
  74. data/lib/{csv_decision → csv_decision2}/paths.rb +5 -5
  75. data/lib/{csv_decision → csv_decision2}/result.rb +2 -2
  76. data/lib/{csv_decision → csv_decision2}/scan.rb +3 -3
  77. data/lib/{csv_decision → csv_decision2}/scan_row.rb +2 -2
  78. data/lib/{csv_decision → csv_decision2}/table.rb +8 -8
  79. data/lib/{csv_decision → csv_decision2}/validate.rb +2 -2
  80. data/lib/csv_decision2.rb +45 -0
  81. data/spec/{csv_decision → csv_decision2}/columns_spec.rb +44 -44
  82. data/spec/{csv_decision → csv_decision2}/constant_spec.rb +4 -4
  83. data/spec/{csv_decision → csv_decision2}/data_spec.rb +11 -11
  84. data/spec/{csv_decision → csv_decision2}/decision_spec.rb +6 -6
  85. data/spec/{csv_decision → csv_decision2}/examples_spec.rb +14 -14
  86. data/spec/{csv_decision → csv_decision2}/index_spec.rb +8 -8
  87. data/spec/{csv_decision → csv_decision2}/input_spec.rb +9 -9
  88. data/spec/{csv_decision → csv_decision2}/load_spec.rb +8 -8
  89. data/spec/{csv_decision → csv_decision2}/matchers/function_spec.rb +7 -7
  90. data/spec/{csv_decision → csv_decision2}/matchers/guard_spec.rb +14 -14
  91. data/spec/{csv_decision → csv_decision2}/matchers/numeric_spec.rb +5 -5
  92. data/spec/{csv_decision → csv_decision2}/matchers/pattern_spec.rb +6 -6
  93. data/spec/{csv_decision → csv_decision2}/matchers/range_spec.rb +5 -5
  94. data/spec/{csv_decision → csv_decision2}/matchers/symbol_spec.rb +6 -6
  95. data/spec/{csv_decision → csv_decision2}/options_spec.rb +18 -18
  96. data/spec/csv_decision2/parse_spec.rb +44 -0
  97. data/spec/{csv_decision → csv_decision2}/table_spec.rb +17 -17
  98. data/spec/csv_decision2_spec.rb +7 -0
  99. metadata +64 -64
  100. data/lib/csv_decision.rb +0 -45
  101. data/spec/csv_decision/parse_spec.rb +0 -44
  102. data/spec/csv_decision_spec.rb +0 -7
@@ -1,23 +1,24 @@
1
1
  <!DOCTYPE html>
2
2
  <html>
3
- <head>
4
- <meta charset="utf-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>
7
- Module: CSVDecision::Data
8
-
3
+
4
+ <head>
5
+ <meta charset="utf-8">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <title>
8
+ Module: CSVDecision2::Data
9
+
9
10
  &mdash; Documentation by YARD 0.9.12
10
-
11
- </title>
11
+
12
+ </title>
12
13
 
13
14
  <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
14
15
 
15
16
  <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
16
17
 
17
- <script type="text/javascript" charset="utf-8">
18
- pathId = "CSVDecision::Data";
19
- relpath = '../';
20
- </script>
18
+ <script type="text/javascript" charset="utf-8">
19
+ pathId = "CSVDecision2::Data";
20
+ relpath = '../';
21
+ </script>
21
22
 
22
23
 
23
24
  <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
@@ -25,336 +26,356 @@
25
26
  <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
26
27
 
27
28
 
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>
29
+ </head>
30
+
31
+ <body>
32
+ <div class="nav_wrap">
33
+ <iframe id="nav" src="../class_list.html?1"></iframe>
34
+ <div id="resizer"></div>
35
+ </div>
36
+
37
+ <div id="main" tabindex="-1">
38
+ <div id="header">
39
+ <div id="menu">
40
+
41
+ <a href="../_index.html">Index (D)</a> &raquo;
42
+ <span class='title'><span class='object_link'><a href="../CSVDecision2.html"
43
+ title="CSVDecision (module)">CSVDecision</a></span></span>
44
+ &raquo;
45
+ <span class="title">Data</span>
34
46
 
35
- <div id="main" tabindex="-1">
36
- <div id="header">
37
- <div id="menu">
38
-
39
- <a href="../_index.html">Index (D)</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">Data</span>
43
-
44
- </div>
45
-
46
- <div id="search">
47
-
48
- <a class="full_list_link" id="class_list_link"
49
- href="../class_list.html">
50
-
51
- <svg width="24" height="24">
52
- <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
- <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
- <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
- </svg>
56
- </a>
57
-
58
- </div>
59
- <div class="clear"></div>
60
47
  </div>
61
48
 
62
- <div id="content"><h1>Module: CSVDecision::Data
63
-
64
-
65
- <span class="private note title">Private</span>
66
- </h1>
67
- <div class="box_info">
68
-
49
+ <div id="search">
50
+
51
+ <a class="full_list_link" id="class_list_link" href="../class_list.html">
69
52
 
70
-
71
-
72
-
73
-
74
-
53
+ <svg width="24" height="24">
54
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
55
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
56
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
57
+ </svg>
58
+ </a>
75
59
 
76
-
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
77
63
 
78
-
79
- <dl>
80
- <dt>Defined in:</dt>
81
- <dd>lib/csv_decision/data.rb</dd>
82
- </dl>
83
-
84
- </div>
64
+ <div id="content">
65
+ <h1>Module: CSVDecision2::Data
85
66
 
86
- <h2>Overview</h2><div class="docstring">
87
- <div class="discussion">
88
- <p class="note private">
89
- <strong>This module is part of a private API.</strong>
90
- You should avoid using this module if possible, as it may be removed or be changed in the future.
91
- </p>
92
67
 
93
- <p>Methods to load data from a file, CSV string or an array of arrays.</p>
68
+ <span class="private note title">Private</span>
69
+ </h1>
70
+ <div class="box_info">
94
71
 
95
72
 
96
- </div>
97
- </div>
98
- <div class="tags">
99
-
100
73
 
101
- </div>
102
74
 
103
75
 
104
76
 
105
77
 
106
78
 
107
79
 
108
-
109
- <h2>
110
- Class Method Summary
111
- <small><a href="#" class="summary_toggle">collapse</a></small>
112
- </h2>
113
80
 
114
- <ul class="summary">
115
-
81
+
82
+ <dl>
83
+ <dt>Defined in:</dt>
84
+ <dd>lib/csv_decision2/data.rb</dd>
85
+ </dl>
86
+
87
+ </div>
88
+
89
+ <h2>Overview</h2>
90
+ <div class="docstring">
91
+ <div class="discussion">
92
+ <p class="note private">
93
+ <strong>This module is part of a private API.</strong>
94
+ You should avoid using this module if possible, as it may be removed or be changed in the future.
95
+ </p>
96
+
97
+ <p>Methods to load data from a file, CSV string or an array of arrays.</p>
98
+
99
+
100
+ </div>
101
+ </div>
102
+ <div class="tags">
103
+
104
+
105
+ </div>
106
+
107
+
108
+
109
+
110
+
111
+
112
+
113
+ <h2>
114
+ Class Method Summary
115
+ <small><a href="#" class="summary_toggle">collapse</a></small>
116
+ </h2>
117
+
118
+ <ul class="summary">
119
+
116
120
  <li class="public ">
117
- <span class="summary_signature">
118
-
119
- <a href="#input_file%3F-class_method" title="input_file? (class method)">.<strong>input_file?</strong>(data) &#x21d2; Boolean </a>
120
-
121
-
122
-
123
- </span>
124
-
125
-
126
-
127
-
128
-
129
-
130
- <span class="private note title">private</span>
131
-
132
-
133
- <span class="summary_desc"><div class='inline'>
134
- <p>If the input is a file name return true, otherwise false.</p>
135
- </div></span>
136
-
137
- </li>
138
-
139
-
121
+ <span class="summary_signature">
122
+
123
+ <a href="#input_file%3F-class_method" title="input_file? (class method)">.<strong>input_file?</strong>(data)
124
+ &#x21d2; Boolean </a>
125
+
126
+
127
+
128
+ </span>
129
+
130
+
131
+
132
+
133
+
134
+
135
+ <span class="private note title">private</span>
136
+
137
+
138
+ <span class="summary_desc">
139
+ <div class='inline'>
140
+ <p>If the input is a file name return true, otherwise false.</p>
141
+ </div>
142
+ </span>
143
+
144
+ </li>
145
+
146
+
140
147
  <li class="public ">
141
- <span class="summary_signature">
142
-
143
- <a href="#strip_columns-class_method" title="strip_columns (class method)">.<strong>strip_columns</strong>(data:, empty_columns:) &#x21d2; Array&lt;Array&lt;String&gt;&gt; </a>
144
-
145
-
146
-
147
- </span>
148
-
149
-
150
-
151
-
152
-
153
-
154
- <span class="private note title">private</span>
155
-
156
-
157
- <span class="summary_desc"><div class='inline'>
158
- <p>Strip the empty columns from the input data rows.</p>
159
- </div></span>
160
-
161
- </li>
162
-
163
-
148
+ <span class="summary_signature">
149
+
150
+ <a href="#strip_columns-class_method"
151
+ title="strip_columns (class method)">.<strong>strip_columns</strong>(data:, empty_columns:) &#x21d2;
152
+ Array&lt;Array&lt;String&gt;&gt; </a>
153
+
154
+
155
+
156
+ </span>
157
+
158
+
159
+
160
+
161
+
162
+
163
+ <span class="private note title">private</span>
164
+
165
+
166
+ <span class="summary_desc">
167
+ <div class='inline'>
168
+ <p>Strip the empty columns from the input data rows.</p>
169
+ </div>
170
+ </span>
171
+
172
+ </li>
173
+
174
+
164
175
  <li class="public ">
165
- <span class="summary_signature">
166
-
167
- <a href="#to_array-class_method" title="to_array (class method)">.<strong>to_array</strong>(data:) &#x21d2; Array&lt;Array&lt;String&gt;&gt; </a>
168
-
169
-
170
-
171
- </span>
172
-
173
-
174
-
175
-
176
-
177
-
178
- <span class="private note title">private</span>
179
-
180
-
181
- <span class="summary_desc"><div class='inline'>
182
- <p>Parse the input data which may either be a file path name, CSV string or
183
- array of arrays.</p>
184
- </div></span>
185
-
186
- </li>
187
-
188
-
189
- </ul>
190
-
191
-
192
-
193
-
194
- <div id="class_method_details" class="method_details_list">
195
- <h2>Class Method Details</h2>
196
-
197
-
198
- <div class="method_details first">
199
- <h3 class="signature first" id="input_file?-class_method">
200
-
201
- .<strong>input_file?</strong>(data) &#x21d2; <tt>Boolean</tt>
202
-
203
-
204
-
205
-
206
-
207
- </h3><div class="docstring">
208
- <div class="discussion">
209
- <p class="note private">
210
- <strong>This method is part of a private API.</strong>
211
- You should avoid using this method if possible, as it may be removed or be changed in the future.
212
- </p>
213
-
214
- <p>If the input is a file name return true, otherwise false.</p>
176
+ <span class="summary_signature">
215
177
 
178
+ <a href="#to_array-class_method" title="to_array (class method)">.<strong>to_array</strong>(data:) &#x21d2;
179
+ Array&lt;Array&lt;String&gt;&gt; </a>
180
+
181
+
182
+
183
+ </span>
184
+
185
+
186
+
187
+
188
+
189
+
190
+ <span class="private note title">private</span>
191
+
192
+
193
+ <span class="summary_desc">
194
+ <div class='inline'>
195
+ <p>Parse the input data which may either be a file path name, CSV string or
196
+ array of arrays.</p>
197
+ </div>
198
+ </span>
199
+
200
+ </li>
201
+
202
+
203
+ </ul>
204
+
205
+
206
+
207
+
208
+ <div id="class_method_details" class="method_details_list">
209
+ <h2>Class Method Details</h2>
210
+
211
+
212
+ <div class="method_details first">
213
+ <h3 class="signature first" id="input_file?-class_method">
214
+
215
+ .<strong>input_file?</strong>(data) &#x21d2; <tt>Boolean</tt>
216
+
217
+
218
+
219
+
220
+
221
+ </h3>
222
+ <div class="docstring">
223
+ <div class="discussion">
224
+ <p class="note private">
225
+ <strong>This method is part of a private API.</strong>
226
+ You should avoid using this method if possible, as it may be removed or be changed in the future.
227
+ </p>
228
+
229
+ <p>If the input is a file name return true, otherwise false.</p>
216
230
 
217
- </div>
218
- </div>
219
- <div class="tags">
220
- <p class="tag_title">Parameters:</p>
221
- <ul class="param">
222
-
223
- <li>
224
-
225
- <span class='name'>data</span>
226
-
227
-
228
- <span class='type'>(<tt>Pathname</tt>, <tt>File</tt>, <tt>Array&lt;Array&lt;String&gt;&gt;</tt>, <tt>String</tt>)</span>
229
-
230
-
231
-
232
- &mdash;
233
- <div class='inline'>
234
- <p>input data given as a CSV file, array of arrays or CSV string.</p>
235
- </div>
236
-
237
- </li>
238
-
239
- </ul>
240
-
241
- <p class="tag_title">Returns:</p>
242
- <ul class="return">
243
-
244
- <li>
245
-
246
-
247
- <span class='type'>(<tt>Boolean</tt>)</span>
248
-
249
-
250
-
251
- &mdash;
252
- <div class='inline'>
253
- <p>Set to true if the input data is passed as a File or Pathname.</p>
254
- </div>
255
-
256
- </li>
257
-
258
- </ul>
259
-
260
- </div><table class="source_code">
261
- <tr>
262
- <td>
263
- <pre class="lines">
231
+
232
+ </div>
233
+ </div>
234
+ <div class="tags">
235
+ <p class="tag_title">Parameters:</p>
236
+ <ul class="param">
237
+
238
+ <li>
239
+
240
+ <span class='name'>data</span>
241
+
242
+
243
+ <span class='type'>(<tt>Pathname</tt>, <tt>File</tt>, <tt>Array&lt;Array&lt;String&gt;&gt;</tt>,
244
+ <tt>String</tt>)</span>
245
+
246
+
247
+
248
+ &mdash;
249
+ <div class='inline'>
250
+ <p>input data given as a CSV file, array of arrays or CSV string.</p>
251
+ </div>
252
+
253
+ </li>
254
+
255
+ </ul>
256
+
257
+ <p class="tag_title">Returns:</p>
258
+ <ul class="return">
259
+
260
+ <li>
261
+
262
+
263
+ <span class='type'>(<tt>Boolean</tt>)</span>
264
+
265
+
266
+
267
+ &mdash;
268
+ <div class='inline'>
269
+ <p>Set to true if the input data is passed as a File or Pathname.</p>
270
+ </div>
271
+
272
+ </li>
273
+
274
+ </ul>
275
+
276
+ </div>
277
+ <table class="source_code">
278
+ <tr>
279
+ <td>
280
+ <pre class="lines">
264
281
 
265
282
 
266
283
  34
267
284
  35
268
285
  36</pre>
269
- </td>
270
- <td>
271
- <pre class="code"><span class="info file"># File 'lib/csv_decision/data.rb', line 34</span>
286
+ </td>
287
+ <td>
288
+ <pre class="code"><span class="info file"># File 'lib/csv_decision2/data.rb', line 34</span>
272
289
 
273
290
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_input_file?'>input_file?</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='rparen'>)</span>
274
291
  <span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Pathname</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>File</span><span class='rparen'>)</span>
275
292
  <span class='kw'>end</span></pre>
276
- </td>
277
- </tr>
278
- </table>
279
- </div>
280
-
281
- <div class="method_details ">
282
- <h3 class="signature " id="strip_columns-class_method">
283
-
284
- .<strong>strip_columns</strong>(data:, empty_columns:) &#x21d2; <tt>Array&lt;Array&lt;String&gt;&gt;</tt>
285
-
286
-
287
-
288
-
289
-
290
- </h3><div class="docstring">
291
- <div class="discussion">
292
- <p class="note private">
293
- <strong>This method is part of a private API.</strong>
294
- You should avoid using this method if possible, as it may be removed or be changed in the future.
295
- </p>
296
-
297
- <p>Strip the empty columns from the input data rows.</p>
293
+ </td>
294
+ </tr>
295
+ </table>
296
+ </div>
298
297
 
298
+ <div class="method_details ">
299
+ <h3 class="signature " id="strip_columns-class_method">
299
300
 
300
- </div>
301
- </div>
302
- <div class="tags">
303
- <p class="tag_title">Parameters:</p>
304
- <ul class="param">
305
-
306
- <li>
307
-
308
- <span class='name'>empty_columns</span>
309
-
310
-
311
- <span class='type'>(<tt>Array&lt;<span class='object_link'><a href="Index.html" title="CSVDecision::Index (class)">Index</a></span>&gt;</tt>)</span>
312
-
313
-
314
-
315
- </li>
316
-
317
- <li>
318
-
319
- <span class='name'>data</span>
320
-
321
-
322
- <span class='type'>(<tt>Pathname</tt>, <tt>File</tt>, <tt>Array&lt;Array&lt;String&gt;&gt;</tt>, <tt>String</tt>)</span>
323
-
324
-
325
-
326
- &mdash;
327
- <div class='inline'>
328
- <p>input data given as a CSV file, array of arrays or CSV string.</p>
329
- </div>
330
-
331
- </li>
332
-
333
- </ul>
334
-
335
- <p class="tag_title">Returns:</p>
336
- <ul class="return">
337
-
338
- <li>
339
-
340
-
341
- <span class='type'>(<tt>Array&lt;Array&lt;String&gt;&gt;</tt>)</span>
342
-
343
-
344
-
345
- &mdash;
346
- <div class='inline'>
347
- <p>Data array stripped of empty columns.</p>
348
- </div>
349
-
350
- </li>
351
-
352
- </ul>
353
-
354
- </div><table class="source_code">
355
- <tr>
356
- <td>
357
- <pre class="lines">
301
+ .<strong>strip_columns</strong>(data:, empty_columns:) &#x21d2; <tt>Array&lt;Array&lt;String&gt;&gt;</tt>
302
+
303
+
304
+
305
+
306
+
307
+ </h3>
308
+ <div class="docstring">
309
+ <div class="discussion">
310
+ <p class="note private">
311
+ <strong>This method is part of a private API.</strong>
312
+ You should avoid using this method if possible, as it may be removed or be changed in the future.
313
+ </p>
314
+
315
+ <p>Strip the empty columns from the input data rows.</p>
316
+
317
+
318
+ </div>
319
+ </div>
320
+ <div class="tags">
321
+ <p class="tag_title">Parameters:</p>
322
+ <ul class="param">
323
+
324
+ <li>
325
+
326
+ <span class='name'>empty_columns</span>
327
+
328
+
329
+ <span class='type'>(<tt>Array&lt;<span class='object_link'><a href="Index.html"
330
+ title="CSVDecision2::Index (class)">Index</a></span>&gt;</tt>)</span>
331
+
332
+
333
+
334
+ </li>
335
+
336
+ <li>
337
+
338
+ <span class='name'>data</span>
339
+
340
+
341
+ <span class='type'>(<tt>Pathname</tt>, <tt>File</tt>, <tt>Array&lt;Array&lt;String&gt;&gt;</tt>,
342
+ <tt>String</tt>)</span>
343
+
344
+
345
+
346
+ &mdash;
347
+ <div class='inline'>
348
+ <p>input data given as a CSV file, array of arrays or CSV string.</p>
349
+ </div>
350
+
351
+ </li>
352
+
353
+ </ul>
354
+
355
+ <p class="tag_title">Returns:</p>
356
+ <ul class="return">
357
+
358
+ <li>
359
+
360
+
361
+ <span class='type'>(<tt>Array&lt;Array&lt;String&gt;&gt;</tt>)</span>
362
+
363
+
364
+
365
+ &mdash;
366
+ <div class='inline'>
367
+ <p>Data array stripped of empty columns.</p>
368
+ </div>
369
+
370
+ </li>
371
+
372
+ </ul>
373
+
374
+ </div>
375
+ <table class="source_code">
376
+ <tr>
377
+ <td>
378
+ <pre class="lines">
358
379
 
359
380
 
360
381
  43
@@ -364,9 +385,9 @@ array of arrays.</p>
364
385
  47
365
386
  48
366
387
  49</pre>
367
- </td>
368
- <td>
369
- <pre class="code"><span class="info file"># File 'lib/csv_decision/data.rb', line 43</span>
388
+ </td>
389
+ <td>
390
+ <pre class="code"><span class="info file"># File 'lib/csv_decision2/data.rb', line 43</span>
370
391
 
371
392
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_strip_columns'>strip_columns</span><span class='lparen'>(</span><span class='label'>data:</span><span class='comma'>,</span> <span class='label'>empty_columns:</span><span class='rparen'>)</span>
372
393
  <span class='comment'># Adjust column indices as we delete columns the rest shift to the left by 1
@@ -375,105 +396,109 @@ array of arrays.</p>
375
396
  <span class='comment'># Delete all empty columns from the array of arrays
376
397
  </span> <span class='id identifier rubyid_empty_columns'>empty_columns</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_col'>col</span><span class='op'>|</span> <span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_each_index'>each_index</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_row'>row</span><span class='op'>|</span> <span class='id identifier rubyid_data'>data</span><span class='lbracket'>[</span><span class='id identifier rubyid_row'>row</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_delete_at'>delete_at</span><span class='lparen'>(</span><span class='id identifier rubyid_col'>col</span><span class='rparen'>)</span> <span class='rbrace'>}</span> <span class='rbrace'>}</span>
377
398
  <span class='kw'>end</span></pre>
378
- </td>
379
- </tr>
380
- </table>
381
- </div>
382
-
383
- <div class="method_details ">
384
- <h3 class="signature " id="to_array-class_method">
385
-
386
- .<strong>to_array</strong>(data:) &#x21d2; <tt>Array&lt;Array&lt;String&gt;&gt;</tt>
387
-
388
-
389
-
390
-
391
-
392
- </h3><div class="docstring">
393
- <div class="discussion">
394
- <p class="note private">
395
- <strong>This method is part of a private API.</strong>
396
- You should avoid using this method if possible, as it may be removed or be changed in the future.
397
- </p>
398
-
399
- <p>Parse the input data which may either be a file path name, CSV string or
400
- array of arrays. Strips out empty columns/rows and comment cells.</p>
399
+ </td>
400
+ </tr>
401
+ </table>
402
+ </div>
401
403
 
404
+ <div class="method_details ">
405
+ <h3 class="signature " id="to_array-class_method">
406
+
407
+ .<strong>to_array</strong>(data:) &#x21d2; <tt>Array&lt;Array&lt;String&gt;&gt;</tt>
408
+
409
+
410
+
411
+
412
+
413
+ </h3>
414
+ <div class="docstring">
415
+ <div class="discussion">
416
+ <p class="note private">
417
+ <strong>This method is part of a private API.</strong>
418
+ You should avoid using this method if possible, as it may be removed or be changed in the future.
419
+ </p>
420
+
421
+ <p>Parse the input data which may either be a file path name, CSV string or
422
+ array of arrays. Strips out empty columns/rows and comment cells.</p>
423
+
424
+
425
+ </div>
426
+ </div>
427
+ <div class="tags">
428
+ <p class="tag_title">Parameters:</p>
429
+ <ul class="param">
430
+
431
+ <li>
432
+
433
+ <span class='name'>data</span>
402
434
 
403
- </div>
404
- </div>
405
- <div class="tags">
406
- <p class="tag_title">Parameters:</p>
407
- <ul class="param">
408
-
409
- <li>
410
-
411
- <span class='name'>data</span>
412
-
413
-
414
- <span class='type'>(<tt>Pathname</tt>, <tt>File</tt>, <tt>Array&lt;Array&lt;String&gt;&gt;</tt>, <tt>String</tt>)</span>
415
-
416
-
417
-
418
- &mdash;
419
- <div class='inline'>
420
- <p>input data given as a CSV file, array of arrays or CSV string.</p>
421
- </div>
422
-
423
- </li>
424
-
425
- </ul>
426
-
427
- <p class="tag_title">Returns:</p>
428
- <ul class="return">
429
-
430
- <li>
431
-
432
-
433
- <span class='type'>(<tt>Array&lt;Array&lt;String&gt;&gt;</tt>)</span>
434
-
435
-
436
-
437
- &mdash;
438
- <div class='inline'>
439
- <p>Data array stripped of empty rows.</p>
440
- </div>
441
-
442
- </li>
443
-
444
- </ul>
445
-
446
- </div><table class="source_code">
447
- <tr>
448
- <td>
449
- <pre class="lines">
435
+
436
+ <span class='type'>(<tt>Pathname</tt>, <tt>File</tt>, <tt>Array&lt;Array&lt;String&gt;&gt;</tt>,
437
+ <tt>String</tt>)</span>
438
+
439
+
440
+
441
+ &mdash;
442
+ <div class='inline'>
443
+ <p>input data given as a CSV file, array of arrays or CSV string.</p>
444
+ </div>
445
+
446
+ </li>
447
+
448
+ </ul>
449
+
450
+ <p class="tag_title">Returns:</p>
451
+ <ul class="return">
452
+
453
+ <li>
454
+
455
+
456
+ <span class='type'>(<tt>Array&lt;Array&lt;String&gt;&gt;</tt>)</span>
457
+
458
+
459
+
460
+ &mdash;
461
+ <div class='inline'>
462
+ <p>Data array stripped of empty rows.</p>
463
+ </div>
464
+
465
+ </li>
466
+
467
+ </ul>
468
+
469
+ </div>
470
+ <table class="source_code">
471
+ <tr>
472
+ <td>
473
+ <pre class="lines">
450
474
 
451
475
 
452
476
  26
453
477
  27
454
478
  28</pre>
455
- </td>
456
- <td>
457
- <pre class="code"><span class="info file"># File 'lib/csv_decision/data.rb', line 26</span>
479
+ </td>
480
+ <td>
481
+ <pre class="code"><span class="info file"># File 'lib/csv_decision2/data.rb', line 26</span>
458
482
 
459
483
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_to_array'>to_array</span><span class='lparen'>(</span><span class='label'>data:</span><span class='rparen'>)</span>
460
484
  <span class='id identifier rubyid_strip_rows'>strip_rows</span><span class='lparen'>(</span><span class='label'>data:</span> <span class='id identifier rubyid_data_array'>data_array</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='rparen'>)</span><span class='rparen'>)</span>
461
485
  <span class='kw'>end</span></pre>
462
- </td>
463
- </tr>
464
- </table>
465
- </div>
466
-
467
- </div>
486
+ </td>
487
+ </tr>
488
+ </table>
489
+ </div>
468
490
 
469
- </div>
491
+ </div>
470
492
 
471
- <div id="footer">
472
- Generated on Sun Feb 11 10:26:07 2018 by
473
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
474
- 0.9.12 (ruby-2.4.0).
475
- </div>
493
+ </div>
476
494
 
495
+ <div id="footer">
496
+ Generated on Sun Feb 11 10:26:07 2018 by
497
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
498
+ 0.9.12 (ruby-2.4.0).
477
499
  </div>
478
- </body>
479
- </html>
500
+
501
+ </div>
502
+ </body>
503
+
504
+ </html>