csv_decision 0.0.3 → 0.0.4
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/.codeclimate.yml +2 -0
- data/.gitignore +2 -1
- data/.travis.yml +2 -3
- data/CHANGELOG.md +19 -1
- data/README.md +49 -16
- data/{benchmark.rb → benchmarks/rufus_decision.rb} +1 -1
- data/csv_decision.gemspec +1 -1
- data/doc/CSVDecision/CellValidationError.html +143 -0
- data/doc/CSVDecision/Columns/Default.html +409 -0
- data/doc/CSVDecision/Columns/Dictionary.html +410 -0
- data/doc/CSVDecision/Columns/Entry.html +321 -0
- data/doc/CSVDecision/Columns.html +476 -0
- data/doc/CSVDecision/Constant.html +295 -0
- data/doc/CSVDecision/Data.html +344 -0
- data/doc/CSVDecision/Decide.html +434 -0
- data/doc/CSVDecision/Decision.html +604 -0
- data/doc/CSVDecision/Error.html +139 -0
- data/doc/CSVDecision/FileError.html +143 -0
- data/doc/CSVDecision/Function.html +229 -0
- data/doc/CSVDecision/Header.html +520 -0
- data/doc/CSVDecision/Input.html +305 -0
- data/doc/CSVDecision/Load.html +225 -0
- data/doc/CSVDecision/Matchers/Constant.html +242 -0
- data/doc/CSVDecision/Matchers/Function.html +342 -0
- data/doc/CSVDecision/Matchers/Matcher.html +325 -0
- data/doc/CSVDecision/Matchers/Numeric.html +277 -0
- data/doc/CSVDecision/Matchers/Pattern.html +600 -0
- data/doc/CSVDecision/Matchers/Range.html +413 -0
- data/doc/CSVDecision/Matchers/Symbol.html +280 -0
- data/doc/CSVDecision/Matchers.html +1529 -0
- data/doc/CSVDecision/Numeric.html +259 -0
- data/doc/CSVDecision/Options.html +445 -0
- data/doc/CSVDecision/Parse.html +270 -0
- data/doc/CSVDecision/ScanRow.html +746 -0
- data/doc/CSVDecision/Symbol.html +256 -0
- data/doc/CSVDecision/Table.html +1115 -0
- data/doc/CSVDecision.html +652 -0
- data/doc/_index.html +410 -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 +264 -0
- data/doc/file_list.html +56 -0
- data/doc/frames.html +17 -0
- data/doc/index.html +264 -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 +683 -0
- data/doc/top-level-namespace.html +110 -0
- data/lib/csv_decision/columns.rb +15 -12
- data/lib/csv_decision/constant.rb +54 -0
- data/lib/csv_decision/decide.rb +5 -5
- data/lib/csv_decision/decision.rb +3 -1
- data/lib/csv_decision/function.rb +32 -0
- data/lib/csv_decision/header.rb +27 -18
- data/lib/csv_decision/input.rb +11 -8
- data/lib/csv_decision/matchers/constant.rb +18 -0
- data/lib/csv_decision/matchers/function.rb +11 -44
- data/lib/csv_decision/matchers/numeric.rb +5 -33
- data/lib/csv_decision/matchers/pattern.rb +26 -11
- data/lib/csv_decision/matchers/range.rb +21 -5
- data/lib/csv_decision/matchers/symbol.rb +20 -0
- data/lib/csv_decision/matchers.rb +85 -20
- data/lib/csv_decision/numeric.rb +38 -0
- data/lib/csv_decision/options.rb +36 -27
- data/lib/csv_decision/parse.rb +46 -39
- data/lib/csv_decision/scan_row.rb +19 -7
- data/lib/csv_decision/symbol.rb +73 -0
- data/lib/csv_decision/table.rb +24 -18
- data/lib/csv_decision.rb +25 -18
- data/spec/csv_decision/columns_spec.rb +1 -1
- data/spec/csv_decision/constant_spec.rb +60 -0
- data/spec/csv_decision/examples_spec.rb +119 -0
- data/spec/csv_decision/matchers/function_spec.rb +48 -28
- data/spec/csv_decision/matchers/numeric_spec.rb +4 -41
- data/spec/csv_decision/matchers/range_spec.rb +31 -61
- data/spec/csv_decision/matchers/symbol_spec.rb +65 -0
- data/spec/csv_decision/options_spec.rb +14 -2
- data/spec/csv_decision/parse_spec.rb +10 -0
- data/spec/csv_decision/table_spec.rb +112 -6
- data/spec/data/valid/simple_constants.csv +3 -3
- metadata +62 -7
- data/spec/csv_decision/simple_example_spec.rb +0 -75
- /data/spec/{csv_decision.rb → csv_decision_spec.rb} +0 -0
|
@@ -0,0 +1,242 @@
|
|
|
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::Constant
|
|
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::Constant";
|
|
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 (C)</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">Constant</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::Constant
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
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::Constant</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/constant.rb</dd>
|
|
100
|
+
</dl>
|
|
101
|
+
|
|
102
|
+
</div>
|
|
103
|
+
|
|
104
|
+
<h2>Overview</h2><div class="docstring">
|
|
105
|
+
<div class="discussion">
|
|
106
|
+
|
|
107
|
+
<p>Cell constant matcher - e.g., := true, = nil.</p>
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
</div>
|
|
111
|
+
</div>
|
|
112
|
+
<div class="tags">
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
</div>
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
<h2>
|
|
124
|
+
Instance Method Summary
|
|
125
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
|
126
|
+
</h2>
|
|
127
|
+
|
|
128
|
+
<ul class="summary">
|
|
129
|
+
|
|
130
|
+
<li class="public ">
|
|
131
|
+
<span class="summary_signature">
|
|
132
|
+
|
|
133
|
+
<a href="#matches%3F-instance_method" title="#matches? (instance method)">#<strong>matches?</strong>(cell) ⇒ Boolean </a>
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
</span>
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
|
148
|
+
|
|
149
|
+
</li>
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
</ul>
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="Matcher.html" title="CSVDecision::Matchers::Matcher (class)">Matcher</a></span></h3>
|
|
165
|
+
<p class="inherited"><span class='object_link'><a href="Matcher.html#initialize-instance_method" title="CSVDecision::Matchers::Matcher#initialize (method)">#initialize</a></span></p>
|
|
166
|
+
<div id="constructor_details" class="method_details_list">
|
|
167
|
+
<h2>Constructor Details</h2>
|
|
168
|
+
|
|
169
|
+
<p class="notice">This class inherits a constructor from <span class='object_link'><a href="Matcher.html#initialize-instance_method" title="CSVDecision::Matchers::Matcher#initialize (method)">CSVDecision::Matchers::Matcher</a></span></p>
|
|
170
|
+
|
|
171
|
+
</div>
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
<div id="instance_method_details" class="method_details_list">
|
|
175
|
+
<h2>Instance Method Details</h2>
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
<div class="method_details first">
|
|
179
|
+
<h3 class="signature first" id="matches?-instance_method">
|
|
180
|
+
|
|
181
|
+
#<strong>matches?</strong>(cell) ⇒ <tt>Boolean</tt>
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
</h3><div class="docstring">
|
|
188
|
+
<div class="discussion">
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
</div>
|
|
192
|
+
</div>
|
|
193
|
+
<div class="tags">
|
|
194
|
+
|
|
195
|
+
<p class="tag_title">Returns:</p>
|
|
196
|
+
<ul class="return">
|
|
197
|
+
|
|
198
|
+
<li>
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
</li>
|
|
206
|
+
|
|
207
|
+
</ul>
|
|
208
|
+
|
|
209
|
+
</div><table class="source_code">
|
|
210
|
+
<tr>
|
|
211
|
+
<td>
|
|
212
|
+
<pre class="lines">
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
13
|
|
216
|
+
14
|
|
217
|
+
15</pre>
|
|
218
|
+
</td>
|
|
219
|
+
<td>
|
|
220
|
+
<pre class="code"><span class="info file"># File 'lib/csv_decision/matchers/constant.rb', line 13</span>
|
|
221
|
+
|
|
222
|
+
<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>
|
|
223
|
+
<span class='const'><span class='object_link'><a href="../../CSVDecision.html" title="CSVDecision (module)">CSVDecision</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Constant.html" title="CSVDecision::Constant (module)">Constant</a></span></span><span class='period'>.</span><span class='id identifier rubyid_matches?'><span class='object_link'><a href="../Constant.html#matches%3F-class_method" title="CSVDecision::Constant.matches? (method)">matches?</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_cell'>cell</span><span class='rparen'>)</span>
|
|
224
|
+
<span class='kw'>end</span></pre>
|
|
225
|
+
</td>
|
|
226
|
+
</tr>
|
|
227
|
+
</table>
|
|
228
|
+
</div>
|
|
229
|
+
|
|
230
|
+
</div>
|
|
231
|
+
|
|
232
|
+
</div>
|
|
233
|
+
|
|
234
|
+
<div id="footer">
|
|
235
|
+
Generated on Tue Dec 26 18:31:38 2017 by
|
|
236
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
237
|
+
0.9.12 (ruby-2.3.0).
|
|
238
|
+
</div>
|
|
239
|
+
|
|
240
|
+
</div>
|
|
241
|
+
</body>
|
|
242
|
+
</html>
|
|
@@ -0,0 +1,342 @@
|
|
|
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
|
+
|
|
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
|
+
|
|
107
|
+
<p>Match cell against a function call</p>
|
|
108
|
+
|
|
109
|
+
<pre class="code ruby"><code class="ruby">* no arguments - e.g., := present?
|
|
110
|
+
* with arguments - e.g., :=lookup?(:table)</code></pre>
|
|
111
|
+
|
|
112
|
+
<p>TODO: fully implement</p>
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
</div>
|
|
116
|
+
</div>
|
|
117
|
+
<div class="tags">
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
</div>
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
<h2>
|
|
129
|
+
Instance Method Summary
|
|
130
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
|
131
|
+
</h2>
|
|
132
|
+
|
|
133
|
+
<ul class="summary">
|
|
134
|
+
|
|
135
|
+
<li class="public ">
|
|
136
|
+
<span class="summary_signature">
|
|
137
|
+
|
|
138
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(options = {}) ⇒ Function </a>
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
</span>
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
<span class="note title constructor">constructor</span>
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
<span class="summary_desc"><div class='inline'>
|
|
155
|
+
<p>A new instance of Function.</p>
|
|
156
|
+
</div></span>
|
|
157
|
+
|
|
158
|
+
</li>
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
<li class="public ">
|
|
162
|
+
<span class="summary_signature">
|
|
163
|
+
|
|
164
|
+
<a href="#matches%3F-instance_method" title="#matches? (instance method)">#<strong>matches?</strong>(cell) ⇒ false, CSVDecision::Proc </a>
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
</span>
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
<span class="summary_desc"><div class='inline'>
|
|
179
|
+
<p>Returns false if this cell is not a match; otherwise returns the
|
|
180
|
+
<code>CSVDecision::Proc</code> object indicating if this is a constant or
|
|
181
|
+
some type of function.</p>
|
|
182
|
+
</div></span>
|
|
183
|
+
|
|
184
|
+
</li>
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
</ul>
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
<div id="constructor_details" class="method_details_list">
|
|
197
|
+
<h2>Constructor Details</h2>
|
|
198
|
+
|
|
199
|
+
<div class="method_details first">
|
|
200
|
+
<h3 class="signature first" id="initialize-instance_method">
|
|
201
|
+
|
|
202
|
+
#<strong>initialize</strong>(options = {}) ⇒ <tt><span class='object_link'><a href="" title="CSVDecision::Matchers::Function (class)">Function</a></span></tt>
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
</h3><div class="docstring">
|
|
209
|
+
<div class="discussion">
|
|
210
|
+
|
|
211
|
+
<p>Returns a new instance of Function</p>
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
</div>
|
|
215
|
+
</div>
|
|
216
|
+
<div class="tags">
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
</div><table class="source_code">
|
|
220
|
+
<tr>
|
|
221
|
+
<td>
|
|
222
|
+
<pre class="lines">
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
14
|
|
226
|
+
15
|
|
227
|
+
16</pre>
|
|
228
|
+
</td>
|
|
229
|
+
<td>
|
|
230
|
+
<pre class="code"><span class="info file"># File 'lib/csv_decision/matchers/function.rb', line 14</span>
|
|
231
|
+
|
|
232
|
+
<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>
|
|
233
|
+
<span class='ivar'>@options</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span>
|
|
234
|
+
<span class='kw'>end</span></pre>
|
|
235
|
+
</td>
|
|
236
|
+
</tr>
|
|
237
|
+
</table>
|
|
238
|
+
</div>
|
|
239
|
+
|
|
240
|
+
</div>
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
<div id="instance_method_details" class="method_details_list">
|
|
244
|
+
<h2>Instance Method Details</h2>
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
<div class="method_details first">
|
|
248
|
+
<h3 class="signature first" id="matches?-instance_method">
|
|
249
|
+
|
|
250
|
+
#<strong>matches?</strong>(cell) ⇒ <tt>false</tt>, <tt><span class='object_link'><a href="../../CSVDecision.html#Proc-constant" title="CSVDecision::Proc (constant)">CSVDecision::Proc</a></span></tt>
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
</h3><div class="docstring">
|
|
257
|
+
<div class="discussion">
|
|
258
|
+
|
|
259
|
+
<p>Returns false if this cell is not a match; otherwise returns the
|
|
260
|
+
<code>CSVDecision::Proc</code> object indicating if this is a constant or
|
|
261
|
+
some type of function.</p>
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
</div>
|
|
265
|
+
</div>
|
|
266
|
+
<div class="tags">
|
|
267
|
+
<p class="tag_title">Parameters:</p>
|
|
268
|
+
<ul class="param">
|
|
269
|
+
|
|
270
|
+
<li>
|
|
271
|
+
|
|
272
|
+
<span class='name'>cell</span>
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
<span class='type'>(<tt>String</tt>)</span>
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
—
|
|
280
|
+
<div class='inline'>
|
|
281
|
+
<p>Data row cell.</p>
|
|
282
|
+
</div>
|
|
283
|
+
|
|
284
|
+
</li>
|
|
285
|
+
|
|
286
|
+
</ul>
|
|
287
|
+
|
|
288
|
+
<p class="tag_title">Returns:</p>
|
|
289
|
+
<ul class="return">
|
|
290
|
+
|
|
291
|
+
<li>
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
<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>
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
—
|
|
299
|
+
<div class='inline'>
|
|
300
|
+
<p>Returns false if this cell is not a match; otherwise returns the
|
|
301
|
+
<code>CSVDecision::Proc</code> object indicating if this is a constant or
|
|
302
|
+
some type of function.</p>
|
|
303
|
+
</div>
|
|
304
|
+
|
|
305
|
+
</li>
|
|
306
|
+
|
|
307
|
+
</ul>
|
|
308
|
+
|
|
309
|
+
</div><table class="source_code">
|
|
310
|
+
<tr>
|
|
311
|
+
<td>
|
|
312
|
+
<pre class="lines">
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
20
|
|
316
|
+
21
|
|
317
|
+
22</pre>
|
|
318
|
+
</td>
|
|
319
|
+
<td>
|
|
320
|
+
<pre class="code"><span class="info file"># File 'lib/csv_decision/matchers/function.rb', line 20</span>
|
|
321
|
+
|
|
322
|
+
<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>
|
|
323
|
+
<span class='const'><span class='object_link'><a href="../../CSVDecision.html" title="CSVDecision (module)">CSVDecision</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Function.html" title="CSVDecision::Function (module)">Function</a></span></span><span class='period'>.</span><span class='id identifier rubyid_matches?'><span class='object_link'><a href="../Function.html#matches%3F-class_method" title="CSVDecision::Function.matches? (method)">matches?</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_cell'>cell</span><span class='rparen'>)</span>
|
|
324
|
+
<span class='kw'>end</span></pre>
|
|
325
|
+
</td>
|
|
326
|
+
</tr>
|
|
327
|
+
</table>
|
|
328
|
+
</div>
|
|
329
|
+
|
|
330
|
+
</div>
|
|
331
|
+
|
|
332
|
+
</div>
|
|
333
|
+
|
|
334
|
+
<div id="footer">
|
|
335
|
+
Generated on Tue Dec 26 18:31:38 2017 by
|
|
336
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
337
|
+
0.9.12 (ruby-2.3.0).
|
|
338
|
+
</div>
|
|
339
|
+
|
|
340
|
+
</div>
|
|
341
|
+
</body>
|
|
342
|
+
</html>
|