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.
- checksums.yaml +4 -4
- data/Dockerfile +1 -1
- data/README.md +16 -16
- data/benchmarks/rufus_decision.rb +5 -7
- data/csv_decision2.gemspec +2 -2
- data/doc/CSVDecision/CellValidationError.html +117 -110
- data/doc/CSVDecision/Columns/Default.html +537 -508
- data/doc/CSVDecision/Columns/Dictionary.html +729 -686
- data/doc/CSVDecision/Columns/Entry.html +457 -433
- data/doc/CSVDecision/Columns.html +1134 -1051
- data/doc/CSVDecision/Constant.html +205 -191
- data/doc/CSVDecision/Data.html +423 -398
- data/doc/CSVDecision/Decide.html +236 -225
- data/doc/CSVDecision/Decision.html +872 -825
- data/doc/CSVDecision/Defaults.html +243 -230
- data/doc/CSVDecision/Dictionary/Entry.html +1026 -964
- data/doc/CSVDecision/Dictionary.html +377 -355
- data/doc/CSVDecision/Error.html +116 -105
- data/doc/CSVDecision/FileError.html +117 -110
- data/doc/CSVDecision/Function.html +181 -168
- data/doc/CSVDecision/Guard.html +200 -185
- data/doc/CSVDecision/Header.html +557 -523
- data/doc/CSVDecision/Index.html +652 -617
- data/doc/CSVDecision/Input.html +329 -312
- data/doc/CSVDecision/Load.html +232 -220
- data/doc/CSVDecision/Matchers/Constant.html +432 -399
- data/doc/CSVDecision/Matchers/Function.html +451 -415
- data/doc/CSVDecision/Matchers/Guard.html +459 -424
- data/doc/CSVDecision/Matchers/Matcher.html +470 -426
- data/doc/CSVDecision/Matchers/Numeric.html +375 -346
- data/doc/CSVDecision/Matchers/Pattern.html +429 -396
- data/doc/CSVDecision/Matchers/Proc.html +617 -575
- data/doc/CSVDecision/Matchers/Range.html +331 -302
- data/doc/CSVDecision/Matchers/Symbol.html +386 -353
- data/doc/CSVDecision/Matchers.html +1509 -1393
- data/doc/CSVDecision/Numeric.html +201 -188
- data/doc/CSVDecision/Options.html +376 -357
- data/doc/CSVDecision/Parse.html +217 -204
- data/doc/CSVDecision/Paths.html +664 -629
- data/doc/CSVDecision/Result.html +1076 -1005
- data/doc/CSVDecision/Scan/InputHashes.html +305 -288
- data/doc/CSVDecision/Scan.html +262 -249
- data/doc/CSVDecision/ScanRow.html +749 -705
- data/doc/CSVDecision/Symbol.html +204 -191
- data/doc/CSVDecision/Table.html +1391 -1305
- data/doc/CSVDecision/TableValidationError.html +117 -110
- data/doc/CSVDecision/Validate.html +353 -337
- data/doc/CSVDecision.html +623 -552
- data/doc/_index.html +488 -448
- data/doc/class_list.html +250 -45
- data/doc/file.README.html +304 -278
- data/doc/index.html +304 -278
- data/doc/method_list.html +1159 -1017
- data/doc/top-level-namespace.html +79 -75
- data/lib/{csv_decision → csv_decision2}/columns.rb +7 -7
- data/lib/{csv_decision → csv_decision2}/data.rb +1 -1
- data/lib/{csv_decision → csv_decision2}/decision.rb +5 -5
- data/lib/{csv_decision → csv_decision2}/defaults.rb +2 -2
- data/lib/{csv_decision → csv_decision2}/dictionary.rb +2 -2
- data/lib/{csv_decision → csv_decision2}/header.rb +5 -5
- data/lib/{csv_decision → csv_decision2}/index.rb +5 -5
- data/lib/{csv_decision → csv_decision2}/input.rb +3 -3
- data/lib/{csv_decision → csv_decision2}/load.rb +6 -6
- data/lib/{csv_decision → csv_decision2}/matchers/constant.rb +2 -2
- data/lib/{csv_decision → csv_decision2}/matchers/function.rb +2 -2
- data/lib/{csv_decision → csv_decision2}/matchers/guard.rb +2 -2
- data/lib/{csv_decision → csv_decision2}/matchers/numeric.rb +2 -2
- data/lib/{csv_decision → csv_decision2}/matchers/pattern.rb +2 -2
- data/lib/{csv_decision → csv_decision2}/matchers/range.rb +2 -2
- data/lib/{csv_decision → csv_decision2}/matchers/symbol.rb +2 -2
- data/lib/{csv_decision → csv_decision2}/matchers.rb +5 -5
- data/lib/{csv_decision → csv_decision2}/options.rb +3 -3
- data/lib/{csv_decision → csv_decision2}/parse.rb +14 -14
- data/lib/{csv_decision → csv_decision2}/paths.rb +5 -5
- data/lib/{csv_decision → csv_decision2}/result.rb +2 -2
- data/lib/{csv_decision → csv_decision2}/scan.rb +3 -3
- data/lib/{csv_decision → csv_decision2}/scan_row.rb +2 -2
- data/lib/{csv_decision → csv_decision2}/table.rb +8 -8
- data/lib/{csv_decision → csv_decision2}/validate.rb +2 -2
- data/lib/csv_decision2.rb +45 -0
- data/spec/{csv_decision → csv_decision2}/columns_spec.rb +44 -44
- data/spec/{csv_decision → csv_decision2}/constant_spec.rb +4 -4
- data/spec/{csv_decision → csv_decision2}/data_spec.rb +11 -11
- data/spec/{csv_decision → csv_decision2}/decision_spec.rb +6 -6
- data/spec/{csv_decision → csv_decision2}/examples_spec.rb +14 -14
- data/spec/{csv_decision → csv_decision2}/index_spec.rb +8 -8
- data/spec/{csv_decision → csv_decision2}/input_spec.rb +9 -9
- data/spec/{csv_decision → csv_decision2}/load_spec.rb +8 -8
- data/spec/{csv_decision → csv_decision2}/matchers/function_spec.rb +7 -7
- data/spec/{csv_decision → csv_decision2}/matchers/guard_spec.rb +14 -14
- data/spec/{csv_decision → csv_decision2}/matchers/numeric_spec.rb +5 -5
- data/spec/{csv_decision → csv_decision2}/matchers/pattern_spec.rb +6 -6
- data/spec/{csv_decision → csv_decision2}/matchers/range_spec.rb +5 -5
- data/spec/{csv_decision → csv_decision2}/matchers/symbol_spec.rb +6 -6
- data/spec/{csv_decision → csv_decision2}/options_spec.rb +18 -18
- data/spec/csv_decision2/parse_spec.rb +44 -0
- data/spec/{csv_decision → csv_decision2}/table_spec.rb +17 -17
- data/spec/csv_decision2_spec.rb +7 -0
- metadata +64 -64
- data/lib/csv_decision.rb +0 -45
- data/spec/csv_decision/parse_spec.rb +0 -44
- data/spec/csv_decision_spec.rb +0 -7
@@ -1,23 +1,24 @@
|
|
1
1
|
<!DOCTYPE html>
|
2
2
|
<html>
|
3
|
-
|
4
|
-
|
5
|
-
<meta
|
6
|
-
<
|
7
|
-
|
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::Constant
|
9
|
+
|
9
10
|
— 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
|
-
|
19
|
-
|
20
|
-
</script>
|
18
|
+
<script type="text/javascript" charset="utf-8">
|
19
|
+
pathId = "CSVDecision2::Constant";
|
20
|
+
relpath = '../';
|
21
|
+
</script>
|
21
22
|
|
22
23
|
|
23
24
|
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
@@ -25,193 +26,205 @@
|
|
25
26
|
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
26
27
|
|
27
28
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
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 (C)</a> »
|
42
|
+
<span class='title'><span class='object_link'><a href="../CSVDecision2.html"
|
43
|
+
title="CSVDecision (module)">CSVDecision</a></span></span>
|
44
|
+
»
|
45
|
+
<span class="title">Constant</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="
|
36
|
-
<
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
<
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
</div>
|
59
|
-
<div class="clear"></div>
|
64
|
+
<div id="content">
|
65
|
+
<h1>Module: CSVDecision2::Constant
|
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/constant.rb</dd>
|
85
|
+
</dl>
|
86
|
+
|
60
87
|
</div>
|
61
88
|
|
62
|
-
<
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
</h1>
|
67
|
-
<div class="box_info">
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
<dl>
|
80
|
-
<dt>Defined in:</dt>
|
81
|
-
<dd>lib/csv_decision/constant.rb</dd>
|
82
|
-
</dl>
|
83
|
-
|
84
|
-
</div>
|
85
|
-
|
86
|
-
<h2>Overview</h2><div class="docstring">
|
87
|
-
<div class="discussion">
|
88
|
-
|
89
|
-
<p>Recognise constant expressions in table data cells - e.g., <tt>= nil</tt>,
|
90
|
-
<tt>:=true</tt>.</p>
|
89
|
+
<h2>Overview</h2>
|
90
|
+
<div class="docstring">
|
91
|
+
<div class="discussion">
|
91
92
|
|
93
|
+
<p>Recognise constant expressions in table data cells - e.g., <tt>= nil</tt>,
|
94
|
+
<tt>:=true</tt>.
|
95
|
+
</p>
|
96
|
+
|
97
|
+
|
98
|
+
</div>
|
99
|
+
</div>
|
100
|
+
<div class="tags">
|
101
|
+
|
102
|
+
|
103
|
+
</div>
|
92
104
|
|
93
|
-
</div>
|
94
|
-
</div>
|
95
|
-
<div class="tags">
|
96
|
-
|
97
105
|
|
98
|
-
</div>
|
99
106
|
|
100
107
|
|
101
108
|
|
102
109
|
|
103
110
|
|
111
|
+
<h2>
|
112
|
+
Class Method Summary
|
113
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
114
|
+
</h2>
|
104
115
|
|
105
|
-
|
106
|
-
<h2>
|
107
|
-
Class Method Summary
|
108
|
-
<small><a href="#" class="summary_toggle">collapse</a></small>
|
109
|
-
</h2>
|
116
|
+
<ul class="summary">
|
110
117
|
|
111
|
-
<ul class="summary">
|
112
|
-
|
113
118
|
<li class="public ">
|
114
|
-
|
115
|
-
|
116
|
-
<a href="#matches%3F-class_method" title="matches? (class method)">.<strong>matches?</strong>(cell) ⇒ Boolean, ... </a>
|
117
|
-
|
119
|
+
<span class="summary_signature">
|
118
120
|
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
121
|
+
<a href="#matches%3F-class_method" title="matches? (class method)">.<strong>matches?</strong>(cell) ⇒
|
122
|
+
Boolean, ... </a>
|
128
123
|
|
129
|
-
|
130
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
131
|
-
|
132
|
-
</li>
|
133
124
|
|
134
|
-
|
135
|
-
</ul>
|
136
|
-
|
137
125
|
|
126
|
+
</span>
|
138
127
|
|
139
128
|
|
140
|
-
<div id="class_method_details" class="method_details_list">
|
141
|
-
<h2>Class Method Details</h2>
|
142
129
|
|
143
|
-
|
144
|
-
<div class="method_details first">
|
145
|
-
<h3 class="signature first" id="matches?-class_method">
|
146
|
-
|
147
|
-
.<strong>matches?</strong>(cell) ⇒ <tt>Boolean</tt>, ...
|
148
|
-
|
149
130
|
|
150
|
-
|
151
131
|
|
152
|
-
|
153
|
-
</h3><div class="docstring">
|
154
|
-
<div class="discussion">
|
155
|
-
|
156
132
|
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
<
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
<
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
</
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
<span class="summary_desc">
|
137
|
+
<div class='inline'></div>
|
138
|
+
</span>
|
139
|
+
|
140
|
+
</li>
|
141
|
+
|
142
|
+
|
143
|
+
</ul>
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
<div id="class_method_details" class="method_details_list">
|
149
|
+
<h2>Class Method Details</h2>
|
150
|
+
|
151
|
+
|
152
|
+
<div class="method_details first">
|
153
|
+
<h3 class="signature first" id="matches?-class_method">
|
154
|
+
|
155
|
+
.<strong>matches?</strong>(cell) ⇒ <tt>Boolean</tt>, ...
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
</h3>
|
162
|
+
<div class="docstring">
|
163
|
+
<div class="discussion">
|
164
|
+
|
165
|
+
|
166
|
+
</div>
|
167
|
+
</div>
|
168
|
+
<div class="tags">
|
169
|
+
<p class="tag_title">Parameters:</p>
|
170
|
+
<ul class="param">
|
171
|
+
|
172
|
+
<li>
|
173
|
+
|
174
|
+
<span class='name'>cell</span>
|
175
|
+
|
176
|
+
|
177
|
+
<span class='type'>(<tt>String</tt>)</span>
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
—
|
182
|
+
<div class='inline'>
|
183
|
+
<p>Data row cell.</p>
|
184
|
+
</div>
|
185
|
+
|
186
|
+
</li>
|
187
|
+
|
188
|
+
</ul>
|
189
|
+
|
190
|
+
<p class="tag_title">Returns:</p>
|
191
|
+
<ul class="return">
|
192
|
+
|
193
|
+
<li>
|
194
|
+
|
195
|
+
|
196
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
</li>
|
201
|
+
|
202
|
+
<li>
|
203
|
+
|
204
|
+
|
205
|
+
<span class='type'>(<tt>false</tt>, <tt><span class='object_link'><a
|
206
|
+
href="../CSVDecision2.html#Proc-constant"
|
207
|
+
title="CSVDecision2::Proc (constant)">CSVDecision2::Proc</a></span></tt>)</span>
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
—
|
212
|
+
<div class='inline'>
|
213
|
+
<p>Returns false if this cell is not a match; otherwise returns the
|
214
|
+
<code>CSVDecision2::Proc</code> object indicating if this is a constant or
|
215
|
+
some type of function.
|
216
|
+
</p>
|
217
|
+
</div>
|
218
|
+
|
219
|
+
</li>
|
220
|
+
|
221
|
+
</ul>
|
222
|
+
|
223
|
+
</div>
|
224
|
+
<table class="source_code">
|
225
|
+
<tr>
|
226
|
+
<td>
|
227
|
+
<pre class="lines">
|
215
228
|
|
216
229
|
|
217
230
|
27
|
@@ -222,9 +235,9 @@ some type of function.</p>
|
|
222
235
|
32
|
223
236
|
33
|
224
237
|
34</pre>
|
225
|
-
|
226
|
-
|
227
|
-
|
238
|
+
</td>
|
239
|
+
<td>
|
240
|
+
<pre class="code"><span class="info file"># File 'lib/csv_decision2/constant.rb', line 27</span>
|
228
241
|
|
229
242
|
<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>
|
230
243
|
<span class='kw'>return</span> <span class='kw'>false</span> <span class='kw'>unless</span> <span class='lparen'>(</span><span class='id identifier rubyid_match'>match</span> <span class='op'>=</span> <span class='const'>EXPRESSION</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><span class='rparen'>)</span>
|
@@ -234,21 +247,22 @@ some type of function.</p>
|
|
234
247
|
|
235
248
|
<span class='id identifier rubyid_numeric?'>numeric?</span><span class='lparen'>(</span><span class='id identifier rubyid_match'>match</span><span class='rparen'>)</span>
|
236
249
|
<span class='kw'>end</span></pre>
|
237
|
-
|
238
|
-
|
239
|
-
</table>
|
240
|
-
</div>
|
241
|
-
|
242
|
-
</div>
|
250
|
+
</td>
|
251
|
+
</tr>
|
252
|
+
</table>
|
253
|
+
</div>
|
243
254
|
|
244
|
-
</div>
|
255
|
+
</div>
|
245
256
|
|
246
|
-
|
247
|
-
Generated on Fri Dec 29 09:33:35 2017 by
|
248
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
249
|
-
0.9.12 (ruby-2.3.0).
|
250
|
-
</div>
|
257
|
+
</div>
|
251
258
|
|
259
|
+
<div id="footer">
|
260
|
+
Generated on Fri Dec 29 09:33:35 2017 by
|
261
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
262
|
+
0.9.12 (ruby-2.3.0).
|
252
263
|
</div>
|
253
|
-
|
254
|
-
</
|
264
|
+
|
265
|
+
</div>
|
266
|
+
</body>
|
267
|
+
|
268
|
+
</html>
|