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.
- 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
|
+
Class: CSVDecision2::Matchers::Function
|
|
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::Matchers::Function";
|
|
20
|
+
relpath = '../../';
|
|
21
|
+
</script>
|
|
21
22
|
|
|
22
23
|
|
|
23
24
|
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
|
|
@@ -25,127 +26,138 @@
|
|
|
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 (F)</a> »
|
|
42
|
+
<span class='title'><span class='object_link'><a href="../../CSVDecision2.html"
|
|
43
|
+
title="CSVDecision (module)">CSVDecision</a></span></span> » <span class='title'><span
|
|
44
|
+
class='object_link'><a href="../Matchers.html"
|
|
45
|
+
title="CSVDecision2::Matchers (class)">Matchers</a></span></span>
|
|
46
|
+
»
|
|
47
|
+
<span class="title">Function</span>
|
|
48
|
+
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
<div id="search">
|
|
52
|
+
|
|
53
|
+
<a class="full_list_link" id="class_list_link" href="../../class_list.html">
|
|
54
|
+
|
|
55
|
+
<svg width="24" height="24">
|
|
56
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
|
57
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
|
58
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
|
59
|
+
</svg>
|
|
60
|
+
</a>
|
|
61
|
+
|
|
62
|
+
</div>
|
|
63
|
+
<div class="clear"></div>
|
|
33
64
|
</div>
|
|
34
65
|
|
|
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
|
-
</
|
|
59
|
-
|
|
66
|
+
<div id="content">
|
|
67
|
+
<h1>Class: CSVDecision2::Matchers::Function
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
<span class="private note title">Private</span>
|
|
71
|
+
</h1>
|
|
72
|
+
<div class="box_info">
|
|
73
|
+
|
|
74
|
+
<dl>
|
|
75
|
+
<dt>Inherits:</dt>
|
|
76
|
+
<dd>
|
|
77
|
+
<span class="inheritName"><span class='object_link'><a href="Matcher.html"
|
|
78
|
+
title="CSVDecision2::Matchers::Matcher (class)">Matcher</a></span></span>
|
|
79
|
+
|
|
80
|
+
<ul class="fullTree">
|
|
81
|
+
<li>Object</li>
|
|
82
|
+
|
|
83
|
+
<li class="next"><span class='object_link'><a href="Matcher.html"
|
|
84
|
+
title="CSVDecision2::Matchers::Matcher (class)">Matcher</a></span></li>
|
|
85
|
+
|
|
86
|
+
<li class="next">CSVDecision2::Matchers::Function</li>
|
|
87
|
+
|
|
88
|
+
</ul>
|
|
89
|
+
<a href="#" class="inheritanceTree">show all</a>
|
|
90
|
+
|
|
91
|
+
</dd>
|
|
92
|
+
</dl>
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
<dl>
|
|
105
|
+
<dt>Defined in:</dt>
|
|
106
|
+
<dd>lib/csv_decision2/matchers/function.rb</dd>
|
|
107
|
+
</dl>
|
|
108
|
+
|
|
60
109
|
</div>
|
|
61
110
|
|
|
62
|
-
<
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
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?
|
|
111
|
+
<h2>Overview</h2>
|
|
112
|
+
<div class="docstring">
|
|
113
|
+
<div class="discussion">
|
|
114
|
+
<p class="note private">
|
|
115
|
+
<strong>This class is part of a private API.</strong>
|
|
116
|
+
You should avoid using this class if possible, as it may be removed or be changed in the future.
|
|
117
|
+
</p>
|
|
118
|
+
|
|
119
|
+
<p>Match cell against a function call</p>
|
|
120
|
+
|
|
121
|
+
<pre class="code ruby"><code class="ruby">* no arguments - e.g., := present?
|
|
114
122
|
* with arguments - e.g., :=lookup?(:table)</code></pre>
|
|
115
123
|
|
|
116
|
-
<p>TODO: fully implement</p>
|
|
124
|
+
<p>TODO: fully implement</p>
|
|
117
125
|
|
|
118
126
|
|
|
119
|
-
|
|
120
|
-
</div>
|
|
121
|
-
<div class="tags">
|
|
122
|
-
|
|
127
|
+
</div>
|
|
128
|
+
</div>
|
|
129
|
+
<div class="tags">
|
|
123
130
|
|
|
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
131
|
|
|
136
|
-
|
|
132
|
+
</div>
|
|
133
|
+
<h2>Constant Summary</h2>
|
|
134
|
+
<dl class="constants">
|
|
137
135
|
|
|
136
|
+
<dt id="FUNCTION_RE-constant" class="">FUNCTION_RE =
|
|
137
|
+
<div class="docstring">
|
|
138
|
+
<div class="discussion">
|
|
139
|
+
<p class="note private">
|
|
140
|
+
<strong>This constant is part of a private API.</strong>
|
|
141
|
+
You should avoid using this constant if possible, as it may be removed or be changed in the future.
|
|
142
|
+
</p>
|
|
138
143
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
144
|
+
<p>Function call regular expression.</p>
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
</div>
|
|
148
|
+
</div>
|
|
149
|
+
<div class="tags">
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
</div>
|
|
153
|
+
</dt>
|
|
154
|
+
<dd>
|
|
155
|
+
<pre
|
|
156
|
+
class="code"><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_regexp'><span class='object_link'><a href="../Matchers.html#regexp-class_method" title="CSVDecision2::Matchers.regexp (method)">regexp</a></span></span><span class='lparen'>(</span><span class='const'>FUNCTION_CALL</span><span class='rparen'>)</span></pre>
|
|
157
|
+
</dd>
|
|
158
|
+
|
|
159
|
+
</dl>
|
|
143
160
|
|
|
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
161
|
|
|
150
162
|
|
|
151
163
|
|
|
@@ -153,227 +165,246 @@
|
|
|
153
165
|
|
|
154
166
|
|
|
155
167
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
168
|
+
<h2>
|
|
169
|
+
Class Method Summary
|
|
170
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
|
171
|
+
</h2>
|
|
172
|
+
|
|
173
|
+
<ul class="summary">
|
|
161
174
|
|
|
162
|
-
<ul class="summary">
|
|
163
|
-
|
|
164
175
|
<li class="public ">
|
|
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
|
-
|
|
176
|
+
<span class="summary_signature">
|
|
177
|
+
|
|
178
|
+
<a href="#matches%3F-class_method" title="matches? (class method)">.<strong>matches?</strong>(cell) ⇒
|
|
179
|
+
Boolean </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'></div>
|
|
195
|
+
</span>
|
|
196
|
+
|
|
197
|
+
</li>
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
</ul>
|
|
201
|
+
|
|
202
|
+
<h2>
|
|
203
|
+
Instance Method Summary
|
|
204
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
|
205
|
+
</h2>
|
|
206
|
+
|
|
207
|
+
<ul class="summary">
|
|
208
|
+
|
|
195
209
|
<li class="public ">
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
<
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
</
|
|
219
|
-
|
|
220
|
-
|
|
210
|
+
<span class="summary_signature">
|
|
211
|
+
|
|
212
|
+
<a href="#initialize-instance_method"
|
|
213
|
+
title="#initialize (instance method)">#<strong>initialize</strong>(options = {}) ⇒ Function </a>
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
</span>
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
<span class="note title constructor">constructor</span>
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
<span class="private note title">private</span>
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
<span class="summary_desc">
|
|
230
|
+
<div class='inline'>
|
|
231
|
+
<p>A new instance of Function.</p>
|
|
232
|
+
</div>
|
|
233
|
+
</span>
|
|
234
|
+
|
|
235
|
+
</li>
|
|
236
|
+
|
|
237
|
+
|
|
221
238
|
<li class="public ">
|
|
222
|
-
|
|
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>
|
|
239
|
+
<span class="summary_signature">
|
|
281
240
|
|
|
241
|
+
<a href="#matches%3F-instance_method" title="#matches? (instance method)">#<strong>matches?</strong>(cell)
|
|
242
|
+
⇒ false, CSVDecision2::Proc </a>
|
|
282
243
|
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
</ul>
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
</span>
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
<span class="private note title">private</span>
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
<span class="summary_desc">
|
|
257
|
+
<div class='inline'>
|
|
258
|
+
<p>Returns false if this cell is not a match; otherwise returns the
|
|
259
|
+
<code>CSVDecision2::Proc</code> object indicating if this is a constant or
|
|
260
|
+
some type of function.
|
|
261
|
+
</p>
|
|
262
|
+
</div>
|
|
263
|
+
</span>
|
|
264
|
+
|
|
265
|
+
</li>
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
</ul>
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="Matcher.html"
|
|
281
|
+
title="CSVDecision2::Matchers::Matcher (class)">Matcher</a></span></h3>
|
|
282
|
+
<p class="inherited"><span class='object_link'><a href="Matcher.html#ins%3F-instance_method"
|
|
283
|
+
title="CSVDecision2::Matchers::Matcher#ins? (method)">#ins?</a></span>, <span class='object_link'><a
|
|
284
|
+
href="Matcher.html#outs%3F-instance_method"
|
|
285
|
+
title="CSVDecision2::Matchers::Matcher#outs? (method)">#outs?</a></span></p>
|
|
286
|
+
<div id="constructor_details" class="method_details_list">
|
|
287
|
+
<h2>Constructor Details</h2>
|
|
288
|
+
|
|
289
|
+
<div class="method_details first">
|
|
290
|
+
<h3 class="signature first" id="initialize-instance_method">
|
|
291
|
+
|
|
292
|
+
#<strong>initialize</strong>(options = {}) ⇒ <tt><span class='object_link'><a href=""
|
|
293
|
+
title="CSVDecision2::Matchers::Function (class)">Function</a></span></tt>
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
</h3>
|
|
300
|
+
<div class="docstring">
|
|
301
|
+
<div class="discussion">
|
|
302
|
+
<p class="note private">
|
|
303
|
+
<strong>This method is part of a private API.</strong>
|
|
304
|
+
You should avoid using this method if possible, as it may be removed or be changed in the future.
|
|
305
|
+
</p>
|
|
306
|
+
|
|
307
|
+
<p>Returns a new instance of Function</p>
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
</div>
|
|
311
|
+
</div>
|
|
312
|
+
<div class="tags">
|
|
313
|
+
<p class="tag_title">Parameters:</p>
|
|
314
|
+
<ul class="param">
|
|
315
|
+
|
|
316
|
+
<li>
|
|
317
|
+
|
|
318
|
+
<span class='name'>options</span>
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
<span class='type'>(<tt>Hash{<span class='object_link'><a href="Symbol.html"
|
|
322
|
+
title="CSVDecision2::Matchers::Symbol (class)">Symbol</a></span>=>Object}</tt>)</span>
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
—
|
|
329
|
+
<div class='inline'>
|
|
330
|
+
<p>Options hash controlling how the table is parsed and interpreted.</p>
|
|
331
|
+
</div>
|
|
332
|
+
|
|
333
|
+
</li>
|
|
334
|
+
|
|
335
|
+
</ul>
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
</div>
|
|
339
|
+
<table class="source_code">
|
|
340
|
+
<tr>
|
|
341
|
+
<td>
|
|
342
|
+
<pre class="lines">
|
|
314
343
|
|
|
315
344
|
|
|
316
345
|
40
|
|
317
346
|
41
|
|
318
347
|
42</pre>
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
348
|
+
</td>
|
|
349
|
+
<td>
|
|
350
|
+
<pre class="code"><span class="info file"># File 'lib/csv_decision2/matchers/function.rb', line 40</span>
|
|
322
351
|
|
|
323
352
|
<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
353
|
<span class='ivar'>@options</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span>
|
|
325
354
|
<span class='kw'>end</span></pre>
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
</table>
|
|
329
|
-
</div>
|
|
330
|
-
|
|
331
|
-
</div>
|
|
355
|
+
</td>
|
|
356
|
+
</tr>
|
|
357
|
+
</table>
|
|
358
|
+
</div>
|
|
332
359
|
|
|
360
|
+
</div>
|
|
333
361
|
|
|
334
|
-
<div id="class_method_details" class="method_details_list">
|
|
335
|
-
<h2>Class Method Details</h2>
|
|
336
362
|
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
<h3 class="signature first" id="matches?-class_method">
|
|
340
|
-
|
|
341
|
-
.<strong>matches?</strong>(cell) ⇒ <tt>Boolean</tt>
|
|
342
|
-
|
|
363
|
+
<div id="class_method_details" class="method_details_list">
|
|
364
|
+
<h2>Class Method Details</h2>
|
|
343
365
|
|
|
344
|
-
|
|
345
366
|
|
|
346
|
-
|
|
347
|
-
|
|
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>
|
|
367
|
+
<div class="method_details first">
|
|
368
|
+
<h3 class="signature first" id="matches?-class_method">
|
|
353
369
|
|
|
370
|
+
.<strong>matches?</strong>(cell) ⇒ <tt>Boolean</tt>
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
|
|
375
|
+
|
|
376
|
+
</h3>
|
|
377
|
+
<div class="docstring">
|
|
378
|
+
<div class="discussion">
|
|
379
|
+
<p class="note private">
|
|
380
|
+
<strong>This method is part of a private API.</strong>
|
|
381
|
+
You should avoid using this method if possible, as it may be removed or be changed in the future.
|
|
382
|
+
</p>
|
|
354
383
|
|
|
355
|
-
|
|
356
|
-
</div>
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
<
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
384
|
+
|
|
385
|
+
</div>
|
|
386
|
+
</div>
|
|
387
|
+
<div class="tags">
|
|
388
|
+
|
|
389
|
+
<p class="tag_title">Returns:</p>
|
|
390
|
+
<ul class="return">
|
|
391
|
+
|
|
392
|
+
<li>
|
|
393
|
+
|
|
394
|
+
|
|
395
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
|
396
|
+
|
|
397
|
+
|
|
398
|
+
|
|
399
|
+
</li>
|
|
400
|
+
|
|
401
|
+
</ul>
|
|
402
|
+
|
|
403
|
+
</div>
|
|
404
|
+
<table class="source_code">
|
|
405
|
+
<tr>
|
|
406
|
+
<td>
|
|
407
|
+
<pre class="lines">
|
|
377
408
|
|
|
378
409
|
|
|
379
410
|
29
|
|
@@ -385,12 +416,12 @@ some type of function.</p>
|
|
|
385
416
|
35
|
|
386
417
|
36
|
|
387
418
|
37</pre>
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
419
|
+
</td>
|
|
420
|
+
<td>
|
|
421
|
+
<pre class="code"><span class="info file"># File 'lib/csv_decision2/matchers/function.rb', line 29</span>
|
|
391
422
|
|
|
392
423
|
<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="
|
|
424
|
+
<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="CSVDecision2::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
425
|
<span class='kw'>return</span> <span class='kw'>false</span> <span class='kw'>unless</span> <span class='id identifier rubyid_match'>match</span>
|
|
395
426
|
|
|
396
427
|
<span class='comment'># operator = match['operator']&.gsub(/\s+/, '')
|
|
@@ -398,114 +429,119 @@ some type of function.</p>
|
|
|
398
429
|
</span> <span class='comment'># args = match['args'].strip
|
|
399
430
|
</span> <span class='comment'># negate = match['negate'] == Matchers::NEGATE
|
|
400
431
|
</span><span class='kw'>end</span></pre>
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
</table>
|
|
404
|
-
</div>
|
|
405
|
-
|
|
406
|
-
</div>
|
|
432
|
+
</td>
|
|
433
|
+
</tr>
|
|
434
|
+
</table>
|
|
435
|
+
</div>
|
|
407
436
|
|
|
408
|
-
|
|
409
|
-
<h2>Instance Method Details</h2>
|
|
437
|
+
</div>
|
|
410
438
|
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
<h3 class="signature first" id="matches?-instance_method">
|
|
414
|
-
|
|
415
|
-
#<strong>matches?</strong>(cell) ⇒ <tt>false</tt>, <tt>CSVDecision::Proc</tt>
|
|
416
|
-
|
|
439
|
+
<div id="instance_method_details" class="method_details_list">
|
|
440
|
+
<h2>Instance Method Details</h2>
|
|
417
441
|
|
|
418
|
-
|
|
419
442
|
|
|
420
|
-
|
|
421
|
-
|
|
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>
|
|
443
|
+
<div class="method_details first">
|
|
444
|
+
<h3 class="signature first" id="matches?-instance_method">
|
|
427
445
|
|
|
428
|
-
|
|
429
|
-
<code>CSVDecision::Proc</code> object indicating if this is a constant or
|
|
430
|
-
some type of function.</p>
|
|
446
|
+
#<strong>matches?</strong>(cell) ⇒ <tt>false</tt>, <tt>CSVDecision2::Proc</tt>
|
|
431
447
|
|
|
432
448
|
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
<
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
</div>
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
<
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
</
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
449
|
+
|
|
450
|
+
|
|
451
|
+
|
|
452
|
+
</h3>
|
|
453
|
+
<div class="docstring">
|
|
454
|
+
<div class="discussion">
|
|
455
|
+
<p class="note private">
|
|
456
|
+
<strong>This method is part of a private API.</strong>
|
|
457
|
+
You should avoid using this method if possible, as it may be removed or be changed in the future.
|
|
458
|
+
</p>
|
|
459
|
+
|
|
460
|
+
<p>Returns false if this cell is not a match; otherwise returns the
|
|
461
|
+
<code>CSVDecision2::Proc</code> object indicating if this is a constant or
|
|
462
|
+
some type of function.
|
|
463
|
+
</p>
|
|
464
|
+
|
|
465
|
+
|
|
466
|
+
</div>
|
|
467
|
+
</div>
|
|
468
|
+
<div class="tags">
|
|
469
|
+
<p class="tag_title">Parameters:</p>
|
|
470
|
+
<ul class="param">
|
|
471
|
+
|
|
472
|
+
<li>
|
|
473
|
+
|
|
474
|
+
<span class='name'>cell</span>
|
|
475
|
+
|
|
476
|
+
|
|
477
|
+
<span class='type'>(<tt>String</tt>)</span>
|
|
478
|
+
|
|
479
|
+
|
|
480
|
+
|
|
481
|
+
—
|
|
482
|
+
<div class='inline'>
|
|
483
|
+
<p>Data row cell.</p>
|
|
484
|
+
</div>
|
|
485
|
+
|
|
486
|
+
</li>
|
|
487
|
+
|
|
488
|
+
</ul>
|
|
489
|
+
|
|
490
|
+
<p class="tag_title">Returns:</p>
|
|
491
|
+
<ul class="return">
|
|
492
|
+
|
|
493
|
+
<li>
|
|
494
|
+
|
|
495
|
+
|
|
496
|
+
<span class='type'>(<tt>false</tt>, <tt>CSVDecision2::Proc</tt>)</span>
|
|
497
|
+
|
|
498
|
+
|
|
499
|
+
|
|
500
|
+
—
|
|
501
|
+
<div class='inline'>
|
|
502
|
+
<p>Returns false if this cell is not a match; otherwise returns the
|
|
503
|
+
<code>CSVDecision2::Proc</code> object indicating if this is a constant or
|
|
504
|
+
some type of function.
|
|
505
|
+
</p>
|
|
506
|
+
</div>
|
|
507
|
+
|
|
508
|
+
</li>
|
|
509
|
+
|
|
510
|
+
</ul>
|
|
511
|
+
|
|
512
|
+
</div>
|
|
513
|
+
<table class="source_code">
|
|
514
|
+
<tr>
|
|
515
|
+
<td>
|
|
516
|
+
<pre class="lines">
|
|
482
517
|
|
|
483
518
|
|
|
484
519
|
46
|
|
485
520
|
47
|
|
486
521
|
48</pre>
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
522
|
+
</td>
|
|
523
|
+
<td>
|
|
524
|
+
<pre class="code"><span class="info file"># File 'lib/csv_decision2/matchers/function.rb', line 46</span>
|
|
490
525
|
|
|
491
526
|
<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="
|
|
527
|
+
<span class='const'><span class='object_link'><a href="" title="CSVDecision2::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="CSVDecision2::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
528
|
<span class='kw'>end</span></pre>
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
</table>
|
|
497
|
-
</div>
|
|
498
|
-
|
|
499
|
-
</div>
|
|
529
|
+
</td>
|
|
530
|
+
</tr>
|
|
531
|
+
</table>
|
|
532
|
+
</div>
|
|
500
533
|
|
|
501
|
-
</div>
|
|
534
|
+
</div>
|
|
502
535
|
|
|
503
|
-
|
|
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>
|
|
536
|
+
</div>
|
|
508
537
|
|
|
538
|
+
<div id="footer">
|
|
539
|
+
Generated on Sun Feb 11 10:26:09 2018 by
|
|
540
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
541
|
+
0.9.12 (ruby-2.4.0).
|
|
509
542
|
</div>
|
|
510
|
-
|
|
511
|
-
</
|
|
543
|
+
|
|
544
|
+
</div>
|
|
545
|
+
</body>
|
|
546
|
+
|
|
547
|
+
</html>
|