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.
- checksums.yaml +7 -0
- data/.codeclimate.yml +3 -0
- data/.coveralls.yml +2 -0
- data/.gitignore +14 -0
- data/.rspec +2 -0
- data/.rubocop.yml +30 -0
- data/.travis.yml +6 -0
- data/CHANGELOG.md +85 -0
- data/Dockerfile +6 -0
- data/Gemfile +7 -0
- data/LICENSE +21 -0
- data/README.md +356 -0
- data/benchmarks/rufus_decision.rb +158 -0
- data/csv_decision2.gemspec +38 -0
- data/doc/CSVDecision/CellValidationError.html +143 -0
- data/doc/CSVDecision/Columns/Default.html +589 -0
- data/doc/CSVDecision/Columns/Dictionary.html +801 -0
- data/doc/CSVDecision/Columns/Entry.html +508 -0
- data/doc/CSVDecision/Columns.html +1259 -0
- data/doc/CSVDecision/Constant.html +254 -0
- data/doc/CSVDecision/Data.html +479 -0
- data/doc/CSVDecision/Decide.html +302 -0
- data/doc/CSVDecision/Decision.html +1011 -0
- data/doc/CSVDecision/Defaults.html +291 -0
- data/doc/CSVDecision/Dictionary/Entry.html +1147 -0
- data/doc/CSVDecision/Dictionary.html +426 -0
- data/doc/CSVDecision/Error.html +139 -0
- data/doc/CSVDecision/FileError.html +143 -0
- data/doc/CSVDecision/Function.html +240 -0
- data/doc/CSVDecision/Guard.html +245 -0
- data/doc/CSVDecision/Header.html +647 -0
- data/doc/CSVDecision/Index.html +741 -0
- data/doc/CSVDecision/Input.html +404 -0
- data/doc/CSVDecision/Load.html +296 -0
- data/doc/CSVDecision/Matchers/Constant.html +484 -0
- data/doc/CSVDecision/Matchers/Function.html +511 -0
- data/doc/CSVDecision/Matchers/Guard.html +503 -0
- data/doc/CSVDecision/Matchers/Matcher.html +507 -0
- data/doc/CSVDecision/Matchers/Numeric.html +415 -0
- data/doc/CSVDecision/Matchers/Pattern.html +491 -0
- data/doc/CSVDecision/Matchers/Proc.html +704 -0
- data/doc/CSVDecision/Matchers/Range.html +379 -0
- data/doc/CSVDecision/Matchers/Symbol.html +426 -0
- data/doc/CSVDecision/Matchers.html +1567 -0
- data/doc/CSVDecision/Numeric.html +259 -0
- data/doc/CSVDecision/Options.html +443 -0
- data/doc/CSVDecision/Parse.html +282 -0
- data/doc/CSVDecision/Paths.html +742 -0
- data/doc/CSVDecision/Result.html +1200 -0
- data/doc/CSVDecision/Scan/InputHashes.html +369 -0
- data/doc/CSVDecision/Scan.html +313 -0
- data/doc/CSVDecision/ScanRow.html +866 -0
- data/doc/CSVDecision/Symbol.html +256 -0
- data/doc/CSVDecision/Table.html +1470 -0
- data/doc/CSVDecision/TableValidationError.html +143 -0
- data/doc/CSVDecision/Validate.html +422 -0
- data/doc/CSVDecision.html +621 -0
- data/doc/_index.html +471 -0
- data/doc/class_list.html +51 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +58 -0
- data/doc/css/style.css +499 -0
- data/doc/file.README.html +421 -0
- data/doc/file_list.html +56 -0
- data/doc/frames.html +17 -0
- data/doc/index.html +421 -0
- data/doc/js/app.js +248 -0
- data/doc/js/full_list.js +216 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +1163 -0
- data/doc/top-level-namespace.html +110 -0
- data/docker-compose.yml +13 -0
- data/lib/csv_decision/columns.rb +192 -0
- data/lib/csv_decision/data.rb +92 -0
- data/lib/csv_decision/decision.rb +196 -0
- data/lib/csv_decision/defaults.rb +47 -0
- data/lib/csv_decision/dictionary.rb +180 -0
- data/lib/csv_decision/header.rb +83 -0
- data/lib/csv_decision/index.rb +107 -0
- data/lib/csv_decision/input.rb +121 -0
- data/lib/csv_decision/load.rb +36 -0
- data/lib/csv_decision/matchers/constant.rb +74 -0
- data/lib/csv_decision/matchers/function.rb +56 -0
- data/lib/csv_decision/matchers/guard.rb +142 -0
- data/lib/csv_decision/matchers/numeric.rb +44 -0
- data/lib/csv_decision/matchers/pattern.rb +94 -0
- data/lib/csv_decision/matchers/range.rb +95 -0
- data/lib/csv_decision/matchers/symbol.rb +149 -0
- data/lib/csv_decision/matchers.rb +220 -0
- data/lib/csv_decision/options.rb +124 -0
- data/lib/csv_decision/parse.rb +165 -0
- data/lib/csv_decision/paths.rb +78 -0
- data/lib/csv_decision/result.rb +204 -0
- data/lib/csv_decision/scan.rb +117 -0
- data/lib/csv_decision/scan_row.rb +142 -0
- data/lib/csv_decision/table.rb +101 -0
- data/lib/csv_decision/validate.rb +85 -0
- data/lib/csv_decision.rb +45 -0
- data/spec/csv_decision/columns_spec.rb +251 -0
- data/spec/csv_decision/constant_spec.rb +36 -0
- data/spec/csv_decision/data_spec.rb +50 -0
- data/spec/csv_decision/decision_spec.rb +19 -0
- data/spec/csv_decision/examples_spec.rb +242 -0
- data/spec/csv_decision/index_spec.rb +58 -0
- data/spec/csv_decision/input_spec.rb +55 -0
- data/spec/csv_decision/load_spec.rb +28 -0
- data/spec/csv_decision/matchers/function_spec.rb +82 -0
- data/spec/csv_decision/matchers/guard_spec.rb +170 -0
- data/spec/csv_decision/matchers/numeric_spec.rb +47 -0
- data/spec/csv_decision/matchers/pattern_spec.rb +183 -0
- data/spec/csv_decision/matchers/range_spec.rb +70 -0
- data/spec/csv_decision/matchers/symbol_spec.rb +67 -0
- data/spec/csv_decision/options_spec.rb +94 -0
- data/spec/csv_decision/parse_spec.rb +44 -0
- data/spec/csv_decision/table_spec.rb +683 -0
- data/spec/csv_decision_spec.rb +7 -0
- data/spec/data/invalid/empty.csv +0 -0
- data/spec/data/invalid/invalid_header1.csv +4 -0
- data/spec/data/invalid/invalid_header2.csv +4 -0
- data/spec/data/invalid/invalid_header3.csv +4 -0
- data/spec/data/invalid/invalid_header4.csv +4 -0
- data/spec/data/valid/benchmark_regexp.csv +10 -0
- data/spec/data/valid/index_example.csv +13 -0
- data/spec/data/valid/multi_column_index.csv +10 -0
- data/spec/data/valid/multi_column_index2.csv +12 -0
- data/spec/data/valid/options_in_file1.csv +5 -0
- data/spec/data/valid/options_in_file2.csv +5 -0
- data/spec/data/valid/options_in_file3.csv +13 -0
- data/spec/data/valid/regular_expressions.csv +11 -0
- data/spec/data/valid/simple_constants.csv +5 -0
- data/spec/data/valid/simple_example.csv +10 -0
- data/spec/data/valid/valid.csv +4 -0
- data/spec/spec_helper.rb +106 -0
- metadata +352 -0
@@ -0,0 +1,511 @@
|
|
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::Matchers::Function
|
8
|
+
|
9
|
+
— 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::Matchers::Function";
|
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 (F)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../../CSVDecision.html" title="CSVDecision (module)">CSVDecision</a></span></span> » <span class='title'><span class='object_link'><a href="../Matchers.html" title="CSVDecision::Matchers (class)">Matchers</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">Function</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::Matchers::Function
|
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"><span class='object_link'><a href="Matcher.html" title="CSVDecision::Matchers::Matcher (class)">Matcher</a></span></span>
|
73
|
+
|
74
|
+
<ul class="fullTree">
|
75
|
+
<li>Object</li>
|
76
|
+
|
77
|
+
<li class="next"><span class='object_link'><a href="Matcher.html" title="CSVDecision::Matchers::Matcher (class)">Matcher</a></span></li>
|
78
|
+
|
79
|
+
<li class="next">CSVDecision::Matchers::Function</li>
|
80
|
+
|
81
|
+
</ul>
|
82
|
+
<a href="#" class="inheritanceTree">show all</a>
|
83
|
+
|
84
|
+
</dd>
|
85
|
+
</dl>
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
<dl>
|
98
|
+
<dt>Defined in:</dt>
|
99
|
+
<dd>lib/csv_decision/matchers/function.rb</dd>
|
100
|
+
</dl>
|
101
|
+
|
102
|
+
</div>
|
103
|
+
|
104
|
+
<h2>Overview</h2><div class="docstring">
|
105
|
+
<div class="discussion">
|
106
|
+
<p class="note private">
|
107
|
+
<strong>This class is part of a private API.</strong>
|
108
|
+
You should avoid using this class if possible, as it may be removed or be changed in the future.
|
109
|
+
</p>
|
110
|
+
|
111
|
+
<p>Match cell against a function call</p>
|
112
|
+
|
113
|
+
<pre class="code ruby"><code class="ruby">* no arguments - e.g., := present?
|
114
|
+
* with arguments - e.g., :=lookup?(:table)</code></pre>
|
115
|
+
|
116
|
+
<p>TODO: fully implement</p>
|
117
|
+
|
118
|
+
|
119
|
+
</div>
|
120
|
+
</div>
|
121
|
+
<div class="tags">
|
122
|
+
|
123
|
+
|
124
|
+
</div>
|
125
|
+
<h2>Constant Summary</h2>
|
126
|
+
<dl class="constants">
|
127
|
+
|
128
|
+
<dt id="FUNCTION_RE-constant" class="">FUNCTION_RE =
|
129
|
+
<div class="docstring">
|
130
|
+
<div class="discussion">
|
131
|
+
<p class="note private">
|
132
|
+
<strong>This constant is part of a private API.</strong>
|
133
|
+
You should avoid using this constant if possible, as it may be removed or be changed in the future.
|
134
|
+
</p>
|
135
|
+
|
136
|
+
<p>Function call regular expression.</p>
|
137
|
+
|
138
|
+
|
139
|
+
</div>
|
140
|
+
</div>
|
141
|
+
<div class="tags">
|
142
|
+
|
143
|
+
|
144
|
+
</div>
|
145
|
+
</dt>
|
146
|
+
<dd><pre class="code"><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_regexp'><span class='object_link'><a href="../Matchers.html#regexp-class_method" title="CSVDecision::Matchers.regexp (method)">regexp</a></span></span><span class='lparen'>(</span><span class='const'>FUNCTION_CALL</span><span class='rparen'>)</span></pre></dd>
|
147
|
+
|
148
|
+
</dl>
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
<h2>
|
158
|
+
Class Method Summary
|
159
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
160
|
+
</h2>
|
161
|
+
|
162
|
+
<ul class="summary">
|
163
|
+
|
164
|
+
<li class="public ">
|
165
|
+
<span class="summary_signature">
|
166
|
+
|
167
|
+
<a href="#matches%3F-class_method" title="matches? (class method)">.<strong>matches?</strong>(cell) ⇒ Boolean </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'></div></span>
|
182
|
+
|
183
|
+
</li>
|
184
|
+
|
185
|
+
|
186
|
+
</ul>
|
187
|
+
|
188
|
+
<h2>
|
189
|
+
Instance Method Summary
|
190
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
191
|
+
</h2>
|
192
|
+
|
193
|
+
<ul class="summary">
|
194
|
+
|
195
|
+
<li class="public ">
|
196
|
+
<span class="summary_signature">
|
197
|
+
|
198
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(options = {}) ⇒ Function </a>
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
</span>
|
203
|
+
|
204
|
+
|
205
|
+
<span class="note title constructor">constructor</span>
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
<span class="private note title">private</span>
|
212
|
+
|
213
|
+
|
214
|
+
<span class="summary_desc"><div class='inline'>
|
215
|
+
<p>A new instance of Function.</p>
|
216
|
+
</div></span>
|
217
|
+
|
218
|
+
</li>
|
219
|
+
|
220
|
+
|
221
|
+
<li class="public ">
|
222
|
+
<span class="summary_signature">
|
223
|
+
|
224
|
+
<a href="#matches%3F-instance_method" title="#matches? (instance method)">#<strong>matches?</strong>(cell) ⇒ false, CSVDecision::Proc </a>
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
</span>
|
229
|
+
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
|
234
|
+
|
235
|
+
<span class="private note title">private</span>
|
236
|
+
|
237
|
+
|
238
|
+
<span class="summary_desc"><div class='inline'>
|
239
|
+
<p>Returns false if this cell is not a match; otherwise returns the
|
240
|
+
<code>CSVDecision::Proc</code> object indicating if this is a constant or
|
241
|
+
some type of function.</p>
|
242
|
+
</div></span>
|
243
|
+
|
244
|
+
</li>
|
245
|
+
|
246
|
+
|
247
|
+
</ul>
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
|
258
|
+
|
259
|
+
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="Matcher.html" title="CSVDecision::Matchers::Matcher (class)">Matcher</a></span></h3>
|
260
|
+
<p class="inherited"><span class='object_link'><a href="Matcher.html#ins%3F-instance_method" title="CSVDecision::Matchers::Matcher#ins? (method)">#ins?</a></span>, <span class='object_link'><a href="Matcher.html#outs%3F-instance_method" title="CSVDecision::Matchers::Matcher#outs? (method)">#outs?</a></span></p>
|
261
|
+
<div id="constructor_details" class="method_details_list">
|
262
|
+
<h2>Constructor Details</h2>
|
263
|
+
|
264
|
+
<div class="method_details first">
|
265
|
+
<h3 class="signature first" id="initialize-instance_method">
|
266
|
+
|
267
|
+
#<strong>initialize</strong>(options = {}) ⇒ <tt><span class='object_link'><a href="" title="CSVDecision::Matchers::Function (class)">Function</a></span></tt>
|
268
|
+
|
269
|
+
|
270
|
+
|
271
|
+
|
272
|
+
|
273
|
+
</h3><div class="docstring">
|
274
|
+
<div class="discussion">
|
275
|
+
<p class="note private">
|
276
|
+
<strong>This method is part of a private API.</strong>
|
277
|
+
You should avoid using this method if possible, as it may be removed or be changed in the future.
|
278
|
+
</p>
|
279
|
+
|
280
|
+
<p>Returns a new instance of Function</p>
|
281
|
+
|
282
|
+
|
283
|
+
</div>
|
284
|
+
</div>
|
285
|
+
<div class="tags">
|
286
|
+
<p class="tag_title">Parameters:</p>
|
287
|
+
<ul class="param">
|
288
|
+
|
289
|
+
<li>
|
290
|
+
|
291
|
+
<span class='name'>options</span>
|
292
|
+
|
293
|
+
|
294
|
+
<span class='type'>(<tt>Hash{<span class='object_link'><a href="Symbol.html" title="CSVDecision::Matchers::Symbol (class)">Symbol</a></span>=>Object}</tt>)</span>
|
295
|
+
|
296
|
+
|
297
|
+
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
298
|
+
|
299
|
+
|
300
|
+
—
|
301
|
+
<div class='inline'>
|
302
|
+
<p>Options hash controlling how the table is parsed and interpreted.</p>
|
303
|
+
</div>
|
304
|
+
|
305
|
+
</li>
|
306
|
+
|
307
|
+
</ul>
|
308
|
+
|
309
|
+
|
310
|
+
</div><table class="source_code">
|
311
|
+
<tr>
|
312
|
+
<td>
|
313
|
+
<pre class="lines">
|
314
|
+
|
315
|
+
|
316
|
+
40
|
317
|
+
41
|
318
|
+
42</pre>
|
319
|
+
</td>
|
320
|
+
<td>
|
321
|
+
<pre class="code"><span class="info file"># File 'lib/csv_decision/matchers/function.rb', line 40</span>
|
322
|
+
|
323
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
324
|
+
<span class='ivar'>@options</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span>
|
325
|
+
<span class='kw'>end</span></pre>
|
326
|
+
</td>
|
327
|
+
</tr>
|
328
|
+
</table>
|
329
|
+
</div>
|
330
|
+
|
331
|
+
</div>
|
332
|
+
|
333
|
+
|
334
|
+
<div id="class_method_details" class="method_details_list">
|
335
|
+
<h2>Class Method Details</h2>
|
336
|
+
|
337
|
+
|
338
|
+
<div class="method_details first">
|
339
|
+
<h3 class="signature first" id="matches?-class_method">
|
340
|
+
|
341
|
+
.<strong>matches?</strong>(cell) ⇒ <tt>Boolean</tt>
|
342
|
+
|
343
|
+
|
344
|
+
|
345
|
+
|
346
|
+
|
347
|
+
</h3><div class="docstring">
|
348
|
+
<div class="discussion">
|
349
|
+
<p class="note private">
|
350
|
+
<strong>This method is part of a private API.</strong>
|
351
|
+
You should avoid using this method if possible, as it may be removed or be changed in the future.
|
352
|
+
</p>
|
353
|
+
|
354
|
+
|
355
|
+
</div>
|
356
|
+
</div>
|
357
|
+
<div class="tags">
|
358
|
+
|
359
|
+
<p class="tag_title">Returns:</p>
|
360
|
+
<ul class="return">
|
361
|
+
|
362
|
+
<li>
|
363
|
+
|
364
|
+
|
365
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
366
|
+
|
367
|
+
|
368
|
+
|
369
|
+
</li>
|
370
|
+
|
371
|
+
</ul>
|
372
|
+
|
373
|
+
</div><table class="source_code">
|
374
|
+
<tr>
|
375
|
+
<td>
|
376
|
+
<pre class="lines">
|
377
|
+
|
378
|
+
|
379
|
+
29
|
380
|
+
30
|
381
|
+
31
|
382
|
+
32
|
383
|
+
33
|
384
|
+
34
|
385
|
+
35
|
386
|
+
36
|
387
|
+
37</pre>
|
388
|
+
</td>
|
389
|
+
<td>
|
390
|
+
<pre class="code"><span class="info file"># File 'lib/csv_decision/matchers/function.rb', line 29</span>
|
391
|
+
|
392
|
+
<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>
|
393
|
+
<span class='id identifier rubyid_match'>match</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="#FUNCTION_RE-constant" title="CSVDecision::Matchers::Function::FUNCTION_RE (constant)">FUNCTION_RE</a></span></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>
|
394
|
+
<span class='kw'>return</span> <span class='kw'>false</span> <span class='kw'>unless</span> <span class='id identifier rubyid_match'>match</span>
|
395
|
+
|
396
|
+
<span class='comment'># operator = match['operator']&.gsub(/\s+/, '')
|
397
|
+
</span> <span class='comment'># name = match['name'].to_sym
|
398
|
+
</span> <span class='comment'># args = match['args'].strip
|
399
|
+
</span> <span class='comment'># negate = match['negate'] == Matchers::NEGATE
|
400
|
+
</span><span class='kw'>end</span></pre>
|
401
|
+
</td>
|
402
|
+
</tr>
|
403
|
+
</table>
|
404
|
+
</div>
|
405
|
+
|
406
|
+
</div>
|
407
|
+
|
408
|
+
<div id="instance_method_details" class="method_details_list">
|
409
|
+
<h2>Instance Method Details</h2>
|
410
|
+
|
411
|
+
|
412
|
+
<div class="method_details first">
|
413
|
+
<h3 class="signature first" id="matches?-instance_method">
|
414
|
+
|
415
|
+
#<strong>matches?</strong>(cell) ⇒ <tt>false</tt>, <tt>CSVDecision::Proc</tt>
|
416
|
+
|
417
|
+
|
418
|
+
|
419
|
+
|
420
|
+
|
421
|
+
</h3><div class="docstring">
|
422
|
+
<div class="discussion">
|
423
|
+
<p class="note private">
|
424
|
+
<strong>This method is part of a private API.</strong>
|
425
|
+
You should avoid using this method if possible, as it may be removed or be changed in the future.
|
426
|
+
</p>
|
427
|
+
|
428
|
+
<p>Returns false if this cell is not a match; otherwise returns the
|
429
|
+
<code>CSVDecision::Proc</code> object indicating if this is a constant or
|
430
|
+
some type of function.</p>
|
431
|
+
|
432
|
+
|
433
|
+
</div>
|
434
|
+
</div>
|
435
|
+
<div class="tags">
|
436
|
+
<p class="tag_title">Parameters:</p>
|
437
|
+
<ul class="param">
|
438
|
+
|
439
|
+
<li>
|
440
|
+
|
441
|
+
<span class='name'>cell</span>
|
442
|
+
|
443
|
+
|
444
|
+
<span class='type'>(<tt>String</tt>)</span>
|
445
|
+
|
446
|
+
|
447
|
+
|
448
|
+
—
|
449
|
+
<div class='inline'>
|
450
|
+
<p>Data row cell.</p>
|
451
|
+
</div>
|
452
|
+
|
453
|
+
</li>
|
454
|
+
|
455
|
+
</ul>
|
456
|
+
|
457
|
+
<p class="tag_title">Returns:</p>
|
458
|
+
<ul class="return">
|
459
|
+
|
460
|
+
<li>
|
461
|
+
|
462
|
+
|
463
|
+
<span class='type'>(<tt>false</tt>, <tt>CSVDecision::Proc</tt>)</span>
|
464
|
+
|
465
|
+
|
466
|
+
|
467
|
+
—
|
468
|
+
<div class='inline'>
|
469
|
+
<p>Returns false if this cell is not a match; otherwise returns the
|
470
|
+
<code>CSVDecision::Proc</code> object indicating if this is a constant or
|
471
|
+
some type of function.</p>
|
472
|
+
</div>
|
473
|
+
|
474
|
+
</li>
|
475
|
+
|
476
|
+
</ul>
|
477
|
+
|
478
|
+
</div><table class="source_code">
|
479
|
+
<tr>
|
480
|
+
<td>
|
481
|
+
<pre class="lines">
|
482
|
+
|
483
|
+
|
484
|
+
46
|
485
|
+
47
|
486
|
+
48</pre>
|
487
|
+
</td>
|
488
|
+
<td>
|
489
|
+
<pre class="code"><span class="info file"># File 'lib/csv_decision/matchers/function.rb', line 46</span>
|
490
|
+
|
491
|
+
<span class='kw'>def</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>
|
492
|
+
<span class='const'><span class='object_link'><a href="" title="CSVDecision::Matchers::Function (class)">Function</a></span></span><span class='period'>.</span><span class='id identifier rubyid_matches?'><span class='object_link'><a href="#matches%3F-class_method" title="CSVDecision::Matchers::Function.matches? (method)">matches?</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_cell'>cell</span><span class='rparen'>)</span>
|
493
|
+
<span class='kw'>end</span></pre>
|
494
|
+
</td>
|
495
|
+
</tr>
|
496
|
+
</table>
|
497
|
+
</div>
|
498
|
+
|
499
|
+
</div>
|
500
|
+
|
501
|
+
</div>
|
502
|
+
|
503
|
+
<div id="footer">
|
504
|
+
Generated on Sun Feb 11 10:26:09 2018 by
|
505
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
506
|
+
0.9.12 (ruby-2.4.0).
|
507
|
+
</div>
|
508
|
+
|
509
|
+
</div>
|
510
|
+
</body>
|
511
|
+
</html>
|