csv_decision2 0.5.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
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::Numeric
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::Numeric
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::Numeric";
19
- relpath = '../';
20
- </script>
18
+ <script type="text/javascript" charset="utf-8">
19
+ pathId = "CSVDecision2::Numeric";
20
+ relpath = '../';
21
+ </script>
21
22
 
22
23
 
23
24
  <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
@@ -25,192 +26,203 @@
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>
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 (N)</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">Numeric</span>
46
+
47
+ </div>
48
+
49
+ <div id="search">
50
+
51
+ <a class="full_list_link" id="class_list_link" href="../class_list.html">
52
+
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>
59
+
60
+ </div>
61
+ <div class="clear"></div>
33
62
  </div>
34
63
 
35
- <div id="main" tabindex="-1">
36
- <div id="header">
37
- <div id="menu">
38
-
39
- <a href="../_index.html">Index (N)</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">Numeric</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>
64
+ <div id="content">
65
+ <h1>Module: CSVDecision2::Numeric
66
+
67
+
68
+
69
+ </h1>
70
+ <div class="box_info">
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+
82
+ <dl>
83
+ <dt>Defined in:</dt>
84
+ <dd>lib/csv_decision2/numeric.rb</dd>
85
+ </dl>
86
+
60
87
  </div>
61
88
 
62
- <div id="content"><h1>Module: CSVDecision::Numeric
63
-
64
-
65
-
66
- </h1>
67
- <div class="box_info">
68
-
89
+ <h2>Overview</h2>
90
+ <div class="docstring">
91
+ <div class="discussion">
69
92
 
70
-
71
-
72
-
73
-
74
-
93
+ <p>Recognise Ruby-like numeric comparison expressions.</p>
75
94
 
76
-
77
95
 
78
-
79
- <dl>
80
- <dt>Defined in:</dt>
81
- <dd>lib/csv_decision/numeric.rb</dd>
82
- </dl>
83
-
84
- </div>
96
+ </div>
97
+ </div>
98
+ <div class="tags">
85
99
 
86
- <h2>Overview</h2><div class="docstring">
87
- <div class="discussion">
88
-
89
- <p>Recognise Ruby-like numeric comparison expressions.</p>
90
100
 
101
+ </div>
91
102
 
92
- </div>
93
- </div>
94
- <div class="tags">
95
-
96
103
 
97
- </div>
98
104
 
99
105
 
100
106
 
101
107
 
102
108
 
109
+ <h2>
110
+ Class Method Summary
111
+ <small><a href="#" class="summary_toggle">collapse</a></small>
112
+ </h2>
103
113
 
104
-
105
- <h2>
106
- Class Method Summary
107
- <small><a href="#" class="summary_toggle">collapse</a></small>
108
- </h2>
114
+ <ul class="summary">
109
115
 
110
- <ul class="summary">
111
-
112
116
  <li class="public ">
113
- <span class="summary_signature">
114
-
115
- <a href="#matches%3F-class_method" title="matches? (class method)">.<strong>matches?</strong>(cell) &#x21d2; Boolean, ... </a>
116
-
117
+ <span class="summary_signature">
117
118
 
118
-
119
- </span>
120
-
121
-
122
-
123
-
124
-
125
-
126
-
119
+ <a href="#matches%3F-class_method" title="matches? (class method)">.<strong>matches?</strong>(cell) &#x21d2;
120
+ Boolean, ... </a>
127
121
 
128
-
129
- <span class="summary_desc"><div class='inline'></div></span>
130
-
131
- </li>
132
122
 
133
-
134
- </ul>
135
-
136
123
 
124
+ </span>
137
125
 
138
126
 
139
- <div id="class_method_details" class="method_details_list">
140
- <h2>Class Method Details</h2>
141
127
 
142
-
143
- <div class="method_details first">
144
- <h3 class="signature first" id="matches?-class_method">
145
-
146
- .<strong>matches?</strong>(cell) &#x21d2; <tt>Boolean</tt>, ...
147
-
148
128
 
149
-
150
129
 
151
-
152
- </h3><div class="docstring">
153
- <div class="discussion">
154
-
155
130
 
156
- </div>
157
- </div>
158
- <div class="tags">
159
- <p class="tag_title">Parameters:</p>
160
- <ul class="param">
161
-
162
- <li>
163
-
164
- <span class='name'>cell</span>
165
-
166
-
167
- <span class='type'>(<tt>String</tt>)</span>
168
-
169
-
170
-
171
- &mdash;
172
- <div class='inline'>
173
- <p>Data row cell.</p>
174
- </div>
175
-
176
- </li>
177
-
178
- </ul>
179
-
180
- <p class="tag_title">Returns:</p>
181
- <ul class="return">
182
-
183
- <li>
184
-
185
-
186
- <span class='type'>(<tt>Boolean</tt>)</span>
187
-
188
-
189
-
190
- </li>
191
-
192
- <li>
193
-
194
-
195
- <span class='type'>(<tt>false</tt>, <tt><span class='object_link'><a href="../CSVDecision.html#Proc-constant" title="CSVDecision::Proc (constant)">CSVDecision::Proc</a></span></tt>)</span>
196
-
197
-
198
-
199
- &mdash;
200
- <div class='inline'>
201
- <p>Returns false if this cell is not a match; otherwise returns the
202
- <code>CSVDecision::Proc</code> object indicating if this is a constant or
203
- some type of function.</p>
204
- </div>
205
-
206
- </li>
207
-
208
- </ul>
209
-
210
- </div><table class="source_code">
211
- <tr>
212
- <td>
213
- <pre class="lines">
131
+
132
+
133
+
134
+ <span class="summary_desc">
135
+ <div class='inline'></div>
136
+ </span>
137
+
138
+ </li>
139
+
140
+
141
+ </ul>
142
+
143
+
144
+
145
+
146
+ <div id="class_method_details" class="method_details_list">
147
+ <h2>Class Method Details</h2>
148
+
149
+
150
+ <div class="method_details first">
151
+ <h3 class="signature first" id="matches?-class_method">
152
+
153
+ .<strong>matches?</strong>(cell) &#x21d2; <tt>Boolean</tt>, ...
154
+
155
+
156
+
157
+
158
+
159
+ </h3>
160
+ <div class="docstring">
161
+ <div class="discussion">
162
+
163
+
164
+ </div>
165
+ </div>
166
+ <div class="tags">
167
+ <p class="tag_title">Parameters:</p>
168
+ <ul class="param">
169
+
170
+ <li>
171
+
172
+ <span class='name'>cell</span>
173
+
174
+
175
+ <span class='type'>(<tt>String</tt>)</span>
176
+
177
+
178
+
179
+ &mdash;
180
+ <div class='inline'>
181
+ <p>Data row cell.</p>
182
+ </div>
183
+
184
+ </li>
185
+
186
+ </ul>
187
+
188
+ <p class="tag_title">Returns:</p>
189
+ <ul class="return">
190
+
191
+ <li>
192
+
193
+
194
+ <span class='type'>(<tt>Boolean</tt>)</span>
195
+
196
+
197
+
198
+ </li>
199
+
200
+ <li>
201
+
202
+
203
+ <span class='type'>(<tt>false</tt>, <tt><span class='object_link'><a
204
+ href="../CSVDecision2.html#Proc-constant"
205
+ title="CSVDecision2::Proc (constant)">CSVDecision2::Proc</a></span></tt>)</span>
206
+
207
+
208
+
209
+ &mdash;
210
+ <div class='inline'>
211
+ <p>Returns false if this cell is not a match; otherwise returns the
212
+ <code>CSVDecision2::Proc</code> object indicating if this is a constant or
213
+ some type of function.
214
+ </p>
215
+ </div>
216
+
217
+ </li>
218
+
219
+ </ul>
220
+
221
+ </div>
222
+ <table class="source_code">
223
+ <tr>
224
+ <td>
225
+ <pre class="lines">
214
226
 
215
227
 
216
228
  27
@@ -224,36 +236,37 @@ some type of function.</p>
224
236
  35
225
237
  36
226
238
  37</pre>
227
- </td>
228
- <td>
229
- <pre class="code"><span class="info file"># File 'lib/csv_decision/numeric.rb', line 27</span>
239
+ </td>
240
+ <td>
241
+ <pre class="code"><span class="info file"># File 'lib/csv_decision2/numeric.rb', line 27</span>
230
242
 
231
243
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_matches?'>matches?</span><span class='lparen'>(</span><span class='id identifier rubyid_cell'>cell</span><span class='rparen'>)</span>
232
244
  <span class='id identifier rubyid_match'>match</span> <span class='op'>=</span> <span class='const'>COMPARISON</span><span class='period'>.</span><span class='id identifier rubyid_match'>match</span><span class='lparen'>(</span><span class='id identifier rubyid_cell'>cell</span><span class='rparen'>)</span>
233
245
  <span class='kw'>return</span> <span class='kw'>false</span> <span class='kw'>unless</span> <span class='id identifier rubyid_match'>match</span>
234
246
 
235
- <span class='id identifier rubyid_numeric_cell'>numeric_cell</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="Matchers.html" title="CSVDecision::Matchers (class)">Matchers</a></span></span><span class='period'>.</span><span class='id identifier rubyid_to_numeric'><span class='object_link'><a href="Matchers.html#to_numeric-class_method" title="CSVDecision::Matchers.to_numeric (method)">to_numeric</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_match'>match</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>value</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='rparen'>)</span>
247
+ <span class='id identifier rubyid_numeric_cell'>numeric_cell</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="Matchers.html" title="CSVDecision2::Matchers (class)">Matchers</a></span></span><span class='period'>.</span><span class='id identifier rubyid_to_numeric'><span class='object_link'><a href="Matchers.html#to_numeric-class_method" title="CSVDecision2::Matchers.to_numeric (method)">to_numeric</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_match'>match</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>value</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='rparen'>)</span>
236
248
  <span class='kw'>return</span> <span class='kw'>false</span> <span class='kw'>unless</span> <span class='id identifier rubyid_numeric_cell'>numeric_cell</span>
237
249
 
238
250
  <span class='id identifier rubyid_comparator'>comparator</span> <span class='op'>=</span> <span class='id identifier rubyid_match'>match</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>comparator</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span>
239
- <span class='const'><span class='object_link'><a href="../CSVDecision.html#Proc-constant" title="CSVDecision::Proc (constant)">Proc</a></span></span><span class='period'>.</span><span class='id identifier rubyid_with'>with</span><span class='lparen'>(</span><span class='label'>type:</span> <span class='symbol'>:proc</span><span class='comma'>,</span>
251
+ <span class='const'><span class='object_link'><a href="../CSVDecision2.html#Proc-constant" title="CSVDecision2::Proc (constant)">Proc</a></span></span><span class='period'>.</span><span class='id identifier rubyid_with'>with</span><span class='lparen'>(</span><span class='label'>type:</span> <span class='symbol'>:proc</span><span class='comma'>,</span>
240
252
  <span class='label'>function:</span> <span class='const'>COMPARATORS</span><span class='lbracket'>[</span><span class='id identifier rubyid_comparator'>comparator</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_curry'>curry</span><span class='lbracket'>[</span><span class='id identifier rubyid_numeric_cell'>numeric_cell</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span><span class='rparen'>)</span>
241
253
  <span class='kw'>end</span></pre>
242
- </td>
243
- </tr>
244
- </table>
245
- </div>
246
-
247
- </div>
254
+ </td>
255
+ </tr>
256
+ </table>
257
+ </div>
248
258
 
249
- </div>
259
+ </div>
250
260
 
251
- <div id="footer">
252
- Generated on Fri Dec 29 09:33:35 2017 by
253
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
254
- 0.9.12 (ruby-2.3.0).
255
- </div>
261
+ </div>
256
262
 
263
+ <div id="footer">
264
+ Generated on Fri Dec 29 09:33:35 2017 by
265
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
266
+ 0.9.12 (ruby-2.3.0).
257
267
  </div>
258
- </body>
259
- </html>
268
+
269
+ </div>
270
+ </body>
271
+
272
+ </html>