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::ScanRow
|
|
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::ScanRow";
|
|
20
|
+
relpath = '../';
|
|
21
|
+
</script>
|
|
21
22
|
|
|
22
23
|
|
|
23
24
|
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
|
@@ -25,557 +26,593 @@
|
|
|
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 (S)</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">ScanRow</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
|
-
|
|
59
|
-
|
|
64
|
+
<div id="content">
|
|
65
|
+
<h1>Class: CSVDecision2::ScanRow
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
<span class="private note title">Private</span>
|
|
69
|
+
</h1>
|
|
70
|
+
<div class="box_info">
|
|
71
|
+
|
|
72
|
+
<dl>
|
|
73
|
+
<dt>Inherits:</dt>
|
|
74
|
+
<dd>
|
|
75
|
+
<span class="inheritName">Object</span>
|
|
76
|
+
|
|
77
|
+
<ul class="fullTree">
|
|
78
|
+
<li>Object</li>
|
|
79
|
+
|
|
80
|
+
<li class="next">CSVDecision2::ScanRow</li>
|
|
81
|
+
|
|
82
|
+
</ul>
|
|
83
|
+
<a href="#" class="inheritanceTree">show all</a>
|
|
84
|
+
|
|
85
|
+
</dd>
|
|
86
|
+
</dl>
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
<dl>
|
|
99
|
+
<dt>Defined in:</dt>
|
|
100
|
+
<dd>lib/csv_decision2/scan_row.rb</dd>
|
|
101
|
+
</dl>
|
|
102
|
+
|
|
60
103
|
</div>
|
|
61
104
|
|
|
62
|
-
<
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
<dl>
|
|
70
|
-
<dt>Inherits:</dt>
|
|
71
|
-
<dd>
|
|
72
|
-
<span class="inheritName">Object</span>
|
|
73
|
-
|
|
74
|
-
<ul class="fullTree">
|
|
75
|
-
<li>Object</li>
|
|
76
|
-
|
|
77
|
-
<li class="next">CSVDecision::ScanRow</li>
|
|
78
|
-
|
|
79
|
-
</ul>
|
|
80
|
-
<a href="#" class="inheritanceTree">show all</a>
|
|
81
|
-
|
|
82
|
-
</dd>
|
|
83
|
-
</dl>
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
<dl>
|
|
96
|
-
<dt>Defined in:</dt>
|
|
97
|
-
<dd>lib/csv_decision/scan_row.rb</dd>
|
|
98
|
-
</dl>
|
|
99
|
-
|
|
100
|
-
</div>
|
|
101
|
-
|
|
102
|
-
<h2>Overview</h2><div class="docstring">
|
|
103
|
-
<div class="discussion">
|
|
104
|
-
<p class="note private">
|
|
105
|
-
<strong>This class is part of a private API.</strong>
|
|
106
|
-
You should avoid using this class if possible, as it may be removed or be changed in the future.
|
|
107
|
-
</p>
|
|
108
|
-
|
|
109
|
-
<p>Data row object indicating which columns are constants versus procs.</p>
|
|
105
|
+
<h2>Overview</h2>
|
|
106
|
+
<div class="docstring">
|
|
107
|
+
<div class="discussion">
|
|
108
|
+
<p class="note private">
|
|
109
|
+
<strong>This class is part of a private API.</strong>
|
|
110
|
+
You should avoid using this class if possible, as it may be removed or be changed in the future.
|
|
111
|
+
</p>
|
|
110
112
|
|
|
113
|
+
<p>Data row object indicating which columns are constants versus procs.</p>
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
</div>
|
|
117
|
+
</div>
|
|
118
|
+
<div class="tags">
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
</div>
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
|
126
|
+
<ul class="summary">
|
|
127
|
+
|
|
128
|
+
<li class="public ">
|
|
129
|
+
<span class="summary_signature">
|
|
130
|
+
|
|
131
|
+
<a href="#constants-instance_method" title="#constants (instance method)">#<strong>constants</strong>
|
|
132
|
+
⇒ Array<Integer> </a>
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
</span>
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
<span class="private note title">private</span>
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
<span class="summary_desc">
|
|
150
|
+
<div class='inline'>
|
|
151
|
+
<p>Column indices for simple constants.</p>
|
|
152
|
+
</div>
|
|
153
|
+
</span>
|
|
154
|
+
|
|
155
|
+
</li>
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
<li class="public ">
|
|
159
|
+
<span class="summary_signature">
|
|
160
|
+
|
|
161
|
+
<a href="#procs-instance_method" title="#procs (instance method)">#<strong>procs</strong> ⇒
|
|
162
|
+
Array<Integer> </a>
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
</span>
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
<span class="note title readonly">readonly</span>
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
<span class="private note title">private</span>
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
<span class="summary_desc">
|
|
182
|
+
<div class='inline'>
|
|
183
|
+
<p>Column indices for Proc objects.</p>
|
|
184
|
+
</div>
|
|
185
|
+
</span>
|
|
186
|
+
|
|
187
|
+
</li>
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
</ul>
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
<h2>
|
|
197
|
+
Class Method Summary
|
|
198
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
|
199
|
+
</h2>
|
|
200
|
+
|
|
201
|
+
<ul class="summary">
|
|
111
202
|
|
|
112
|
-
</div>
|
|
113
|
-
</div>
|
|
114
|
-
<div class="tags">
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
</div>
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
|
122
|
-
<ul class="summary">
|
|
123
|
-
|
|
124
|
-
<li class="public ">
|
|
125
|
-
<span class="summary_signature">
|
|
126
|
-
|
|
127
|
-
<a href="#constants-instance_method" title="#constants (instance method)">#<strong>constants</strong> ⇒ Array<Integer> </a>
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
</span>
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
<span class="private note title">private</span>
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
<span class="summary_desc"><div class='inline'>
|
|
145
|
-
<p>Column indices for simple constants.</p>
|
|
146
|
-
</div></span>
|
|
147
|
-
|
|
148
|
-
</li>
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
<li class="public ">
|
|
152
|
-
<span class="summary_signature">
|
|
153
|
-
|
|
154
|
-
<a href="#procs-instance_method" title="#procs (instance method)">#<strong>procs</strong> ⇒ Array<Integer> </a>
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
</span>
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
<span class="note title readonly">readonly</span>
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
<span class="private note title">private</span>
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
<span class="summary_desc"><div class='inline'>
|
|
174
|
-
<p>Column indices for Proc objects.</p>
|
|
175
|
-
</div></span>
|
|
176
|
-
|
|
177
|
-
</li>
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
</ul>
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
<h2>
|
|
187
|
-
Class Method Summary
|
|
188
|
-
<small><a href="#" class="summary_toggle">collapse</a></small>
|
|
189
|
-
</h2>
|
|
190
|
-
|
|
191
|
-
<ul class="summary">
|
|
192
|
-
|
|
193
203
|
<li class="public ">
|
|
194
|
-
|
|
195
|
-
|
|
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
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
204
|
+
<span class="summary_signature">
|
|
205
|
+
|
|
206
|
+
<a href="#scan-class_method" title="scan (class method)">.<strong>scan</strong>(column:, matchers:, cell:)
|
|
207
|
+
⇒ false, Matchers::Proc </a>
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
</span>
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
<span class="private note title">private</span>
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
<span class="summary_desc">
|
|
222
|
+
<div class='inline'>
|
|
223
|
+
<p>Scan the table cell against all matches.</p>
|
|
224
|
+
</div>
|
|
225
|
+
</span>
|
|
226
|
+
|
|
227
|
+
</li>
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
</ul>
|
|
231
|
+
|
|
232
|
+
<h2>
|
|
233
|
+
Instance Method Summary
|
|
234
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
|
235
|
+
</h2>
|
|
236
|
+
|
|
237
|
+
<ul class="summary">
|
|
238
|
+
|
|
226
239
|
<li class="public ">
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
<
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
</
|
|
250
|
-
|
|
251
|
-
|
|
240
|
+
<span class="summary_signature">
|
|
241
|
+
|
|
242
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>
|
|
243
|
+
⇒ ScanRow </a>
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
</span>
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
<span class="note title constructor">constructor</span>
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
<span class="private note title">private</span>
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
<span class="summary_desc">
|
|
260
|
+
<div class='inline'>
|
|
261
|
+
<p>A new instance of ScanRow.</p>
|
|
262
|
+
</div>
|
|
263
|
+
</span>
|
|
264
|
+
|
|
265
|
+
</li>
|
|
266
|
+
|
|
267
|
+
|
|
252
268
|
<li class="public ">
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
<
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
</
|
|
274
|
-
|
|
275
|
-
|
|
269
|
+
<span class="summary_signature">
|
|
270
|
+
|
|
271
|
+
<a href="#match%3F-instance_method" title="#match? (instance method)">#<strong>match?</strong>(row:,
|
|
272
|
+
scan_cols:, hash:) ⇒ Boolean </a>
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
</span>
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
<span class="private note title">private</span>
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
<span class="summary_desc">
|
|
287
|
+
<div class='inline'>
|
|
288
|
+
<p>Match cells in the input hash against a decision table row.</p>
|
|
289
|
+
</div>
|
|
290
|
+
</span>
|
|
291
|
+
|
|
292
|
+
</li>
|
|
293
|
+
|
|
294
|
+
|
|
276
295
|
<li class="public ">
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
<a href="#scan_columns-instance_method" title="#scan_columns (instance method)">#<strong>scan_columns</strong>(row:, columns:, matchers:) ⇒ Array </a>
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
</span>
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
<span class="private note title">private</span>
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
<span class="summary_desc"><div class='inline'>
|
|
294
|
-
<p>Scan all the specified <code>columns</code> (e.g., inputs) in the given
|
|
295
|
-
<code>data</code> row using the <code>matchers</code> array supplied.</p>
|
|
296
|
-
</div></span>
|
|
297
|
-
|
|
298
|
-
</li>
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
</ul>
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
<div id="constructor_details" class="method_details_list">
|
|
305
|
-
<h2>Constructor Details</h2>
|
|
306
|
-
|
|
307
|
-
<div class="method_details first">
|
|
308
|
-
<h3 class="signature first" id="initialize-instance_method">
|
|
309
|
-
|
|
310
|
-
#<strong>initialize</strong> ⇒ <tt><span class='object_link'><a href="" title="CSVDecision::ScanRow (class)">ScanRow</a></span></tt>
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
</h3><div class="docstring">
|
|
317
|
-
<div class="discussion">
|
|
318
|
-
<p class="note private">
|
|
319
|
-
<strong>This method is part of a private API.</strong>
|
|
320
|
-
You should avoid using this method if possible, as it may be removed or be changed in the future.
|
|
321
|
-
</p>
|
|
322
|
-
|
|
323
|
-
<p>Returns a new instance of ScanRow</p>
|
|
296
|
+
<span class="summary_signature">
|
|
324
297
|
|
|
298
|
+
<a href="#scan_columns-instance_method"
|
|
299
|
+
title="#scan_columns (instance method)">#<strong>scan_columns</strong>(row:, columns:, matchers:) ⇒
|
|
300
|
+
Array </a>
|
|
325
301
|
|
|
326
|
-
</div>
|
|
327
|
-
</div>
|
|
328
|
-
<div class="tags">
|
|
329
|
-
|
|
330
302
|
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
303
|
+
|
|
304
|
+
</span>
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
<span class="private note title">private</span>
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
<span class="summary_desc">
|
|
315
|
+
<div class='inline'>
|
|
316
|
+
<p>Scan all the specified <code>columns</code> (e.g., inputs) in the given
|
|
317
|
+
<code>data</code> row using the <code>matchers</code> array supplied.
|
|
318
|
+
</p>
|
|
319
|
+
</div>
|
|
320
|
+
</span>
|
|
321
|
+
|
|
322
|
+
</li>
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
</ul>
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
<div id="constructor_details" class="method_details_list">
|
|
329
|
+
<h2>Constructor Details</h2>
|
|
330
|
+
|
|
331
|
+
<div class="method_details first">
|
|
332
|
+
<h3 class="signature first" id="initialize-instance_method">
|
|
333
|
+
|
|
334
|
+
#<strong>initialize</strong> ⇒ <tt><span class='object_link'><a href=""
|
|
335
|
+
title="CSVDecision2::ScanRow (class)">ScanRow</a></span></tt>
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
</h3>
|
|
342
|
+
<div class="docstring">
|
|
343
|
+
<div class="discussion">
|
|
344
|
+
<p class="note private">
|
|
345
|
+
<strong>This method is part of a private API.</strong>
|
|
346
|
+
You should avoid using this method if possible, as it may be removed or be changed in the future.
|
|
347
|
+
</p>
|
|
348
|
+
|
|
349
|
+
<p>Returns a new instance of ScanRow</p>
|
|
350
|
+
|
|
351
|
+
|
|
352
|
+
</div>
|
|
353
|
+
</div>
|
|
354
|
+
<div class="tags">
|
|
355
|
+
|
|
356
|
+
|
|
357
|
+
</div>
|
|
358
|
+
<table class="source_code">
|
|
359
|
+
<tr>
|
|
360
|
+
<td>
|
|
361
|
+
<pre class="lines">
|
|
335
362
|
|
|
336
363
|
|
|
337
364
|
72
|
|
338
365
|
73
|
|
339
366
|
74
|
|
340
367
|
75</pre>
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
368
|
+
</td>
|
|
369
|
+
<td>
|
|
370
|
+
<pre class="code"><span class="info file"># File 'lib/csv_decision2/scan_row.rb', line 72</span>
|
|
344
371
|
|
|
345
372
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
|
|
346
373
|
<span class='ivar'>@constants</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
|
347
374
|
<span class='ivar'>@procs</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
|
348
375
|
<span class='kw'>end</span></pre>
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
</table>
|
|
352
|
-
</div>
|
|
353
|
-
|
|
354
|
-
</div>
|
|
355
|
-
|
|
356
|
-
<div id="instance_attr_details" class="attr_details">
|
|
357
|
-
<h2>Instance Attribute Details</h2>
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
<span id="constants=-instance_method"></span>
|
|
361
|
-
<div class="method_details first">
|
|
362
|
-
<h3 class="signature first" id="constants-instance_method">
|
|
363
|
-
|
|
364
|
-
#<strong>constants</strong> ⇒ <tt>Array<Integer></tt>
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
</h3><div class="docstring">
|
|
371
|
-
<div class="discussion">
|
|
372
|
-
<p class="note private">
|
|
373
|
-
<strong>This method is part of a private API.</strong>
|
|
374
|
-
You should avoid using this method if possible, as it may be removed or be changed in the future.
|
|
375
|
-
</p>
|
|
376
|
-
|
|
377
|
-
<p>Returns Column indices for simple constants.</p>
|
|
376
|
+
</td>
|
|
377
|
+
</tr>
|
|
378
|
+
</table>
|
|
379
|
+
</div>
|
|
378
380
|
|
|
381
|
+
</div>
|
|
379
382
|
|
|
380
|
-
|
|
381
|
-
</
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
<
|
|
385
|
-
<
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
<
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
383
|
+
<div id="instance_attr_details" class="attr_details">
|
|
384
|
+
<h2>Instance Attribute Details</h2>
|
|
385
|
+
|
|
386
|
+
|
|
387
|
+
<span id="constants=-instance_method"></span>
|
|
388
|
+
<div class="method_details first">
|
|
389
|
+
<h3 class="signature first" id="constants-instance_method">
|
|
390
|
+
|
|
391
|
+
#<strong>constants</strong> ⇒ <tt>Array<Integer></tt>
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
|
|
397
|
+
</h3>
|
|
398
|
+
<div class="docstring">
|
|
399
|
+
<div class="discussion">
|
|
400
|
+
<p class="note private">
|
|
401
|
+
<strong>This method is part of a private API.</strong>
|
|
402
|
+
You should avoid using this method if possible, as it may be removed or be changed in the future.
|
|
403
|
+
</p>
|
|
404
|
+
|
|
405
|
+
<p>Returns Column indices for simple constants.</p>
|
|
406
|
+
|
|
407
|
+
|
|
408
|
+
</div>
|
|
409
|
+
</div>
|
|
410
|
+
<div class="tags">
|
|
411
|
+
|
|
412
|
+
<p class="tag_title">Returns:</p>
|
|
413
|
+
<ul class="return">
|
|
414
|
+
|
|
415
|
+
<li>
|
|
416
|
+
|
|
417
|
+
|
|
418
|
+
<span class='type'>(<tt>Array<Integer></tt>)</span>
|
|
419
|
+
|
|
420
|
+
|
|
421
|
+
|
|
422
|
+
—
|
|
423
|
+
<div class='inline'>
|
|
424
|
+
<p>Column indices for simple constants.</p>
|
|
425
|
+
</div>
|
|
426
|
+
|
|
427
|
+
</li>
|
|
428
|
+
|
|
429
|
+
</ul>
|
|
430
|
+
|
|
431
|
+
</div>
|
|
432
|
+
<table class="source_code">
|
|
433
|
+
<tr>
|
|
434
|
+
<td>
|
|
435
|
+
<pre class="lines">
|
|
407
436
|
|
|
408
437
|
|
|
409
438
|
67
|
|
410
439
|
68
|
|
411
440
|
69</pre>
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
441
|
+
</td>
|
|
442
|
+
<td>
|
|
443
|
+
<pre class="code"><span class="info file"># File 'lib/csv_decision2/scan_row.rb', line 67</span>
|
|
415
444
|
|
|
416
445
|
<span class='kw'>def</span> <span class='id identifier rubyid_constants'>constants</span>
|
|
417
446
|
<span class='ivar'>@constants</span>
|
|
418
447
|
<span class='kw'>end</span></pre>
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
</table>
|
|
422
|
-
</div>
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
<span id=""></span>
|
|
426
|
-
<div class="method_details ">
|
|
427
|
-
<h3 class="signature " id="procs-instance_method">
|
|
428
|
-
|
|
429
|
-
#<strong>procs</strong> ⇒ <tt>Array<Integer></tt> <span class="extras">(readonly)</span>
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
</h3><div class="docstring">
|
|
436
|
-
<div class="discussion">
|
|
437
|
-
<p class="note private">
|
|
438
|
-
<strong>This method is part of a private API.</strong>
|
|
439
|
-
You should avoid using this method if possible, as it may be removed or be changed in the future.
|
|
440
|
-
</p>
|
|
441
|
-
|
|
442
|
-
<p>Returns Column indices for Proc objects.</p>
|
|
448
|
+
</td>
|
|
449
|
+
</tr>
|
|
450
|
+
</table>
|
|
451
|
+
</div>
|
|
443
452
|
|
|
444
453
|
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
<
|
|
448
|
-
|
|
449
|
-
<
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
</
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
454
|
+
<span id=""></span>
|
|
455
|
+
<div class="method_details ">
|
|
456
|
+
<h3 class="signature " id="procs-instance_method">
|
|
457
|
+
|
|
458
|
+
#<strong>procs</strong> ⇒ <tt>Array<Integer></tt> <span class="extras">(readonly)</span>
|
|
459
|
+
|
|
460
|
+
|
|
461
|
+
|
|
462
|
+
|
|
463
|
+
|
|
464
|
+
</h3>
|
|
465
|
+
<div class="docstring">
|
|
466
|
+
<div class="discussion">
|
|
467
|
+
<p class="note private">
|
|
468
|
+
<strong>This method is part of a private API.</strong>
|
|
469
|
+
You should avoid using this method if possible, as it may be removed or be changed in the future.
|
|
470
|
+
</p>
|
|
471
|
+
|
|
472
|
+
<p>Returns Column indices for Proc objects.</p>
|
|
473
|
+
|
|
474
|
+
|
|
475
|
+
</div>
|
|
476
|
+
</div>
|
|
477
|
+
<div class="tags">
|
|
478
|
+
|
|
479
|
+
<p class="tag_title">Returns:</p>
|
|
480
|
+
<ul class="return">
|
|
481
|
+
|
|
482
|
+
<li>
|
|
483
|
+
|
|
484
|
+
|
|
485
|
+
<span class='type'>(<tt>Array<Integer></tt>)</span>
|
|
486
|
+
|
|
487
|
+
|
|
488
|
+
|
|
489
|
+
—
|
|
490
|
+
<div class='inline'>
|
|
491
|
+
<p>Column indices for Proc objects.</p>
|
|
492
|
+
</div>
|
|
493
|
+
|
|
494
|
+
</li>
|
|
495
|
+
|
|
496
|
+
</ul>
|
|
497
|
+
|
|
498
|
+
</div>
|
|
499
|
+
<table class="source_code">
|
|
500
|
+
<tr>
|
|
501
|
+
<td>
|
|
502
|
+
<pre class="lines">
|
|
472
503
|
|
|
473
504
|
|
|
474
505
|
70
|
|
475
506
|
71
|
|
476
507
|
72</pre>
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
508
|
+
</td>
|
|
509
|
+
<td>
|
|
510
|
+
<pre class="code"><span class="info file"># File 'lib/csv_decision2/scan_row.rb', line 70</span>
|
|
480
511
|
|
|
481
512
|
<span class='kw'>def</span> <span class='id identifier rubyid_procs'>procs</span>
|
|
482
513
|
<span class='ivar'>@procs</span>
|
|
483
514
|
<span class='kw'>end</span></pre>
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
</table>
|
|
487
|
-
</div>
|
|
488
|
-
|
|
489
|
-
</div>
|
|
515
|
+
</td>
|
|
516
|
+
</tr>
|
|
517
|
+
</table>
|
|
518
|
+
</div>
|
|
490
519
|
|
|
520
|
+
</div>
|
|
491
521
|
|
|
492
|
-
<div id="class_method_details" class="method_details_list">
|
|
493
|
-
<h2>Class Method Details</h2>
|
|
494
522
|
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
<h3 class="signature first" id="scan-class_method">
|
|
498
|
-
|
|
499
|
-
.<strong>scan</strong>(column:, matchers:, cell:) ⇒ <tt>false</tt>, <tt><span class='object_link'><a href="Matchers/Proc.html" title="CSVDecision::Matchers::Proc (class)">Matchers::Proc</a></span></tt>
|
|
500
|
-
|
|
523
|
+
<div id="class_method_details" class="method_details_list">
|
|
524
|
+
<h2>Class Method Details</h2>
|
|
501
525
|
|
|
502
|
-
|
|
503
526
|
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
<div class="discussion">
|
|
507
|
-
<p class="note private">
|
|
508
|
-
<strong>This method is part of a private API.</strong>
|
|
509
|
-
You should avoid using this method if possible, as it may be removed or be changed in the future.
|
|
510
|
-
</p>
|
|
527
|
+
<div class="method_details first">
|
|
528
|
+
<h3 class="signature first" id="scan-class_method">
|
|
511
529
|
|
|
512
|
-
|
|
530
|
+
.<strong>scan</strong>(column:, matchers:, cell:) ⇒ <tt>false</tt>, <tt><span class='object_link'><a
|
|
531
|
+
href="Matchers/Proc.html" title="CSVDecision2::Matchers::Proc (class)">Matchers::Proc</a></span></tt>
|
|
532
|
+
|
|
533
|
+
|
|
534
|
+
|
|
535
|
+
|
|
536
|
+
|
|
537
|
+
</h3>
|
|
538
|
+
<div class="docstring">
|
|
539
|
+
<div class="discussion">
|
|
540
|
+
<p class="note private">
|
|
541
|
+
<strong>This method is part of a private API.</strong>
|
|
542
|
+
You should avoid using this method if possible, as it may be removed or be changed in the future.
|
|
543
|
+
</p>
|
|
544
|
+
|
|
545
|
+
<p>Scan the table cell against all matches.</p>
|
|
546
|
+
|
|
547
|
+
|
|
548
|
+
</div>
|
|
549
|
+
</div>
|
|
550
|
+
<div class="tags">
|
|
551
|
+
<p class="tag_title">Parameters:</p>
|
|
552
|
+
<ul class="param">
|
|
553
|
+
|
|
554
|
+
<li>
|
|
555
|
+
|
|
556
|
+
<span class='name'>column</span>
|
|
557
|
+
|
|
558
|
+
|
|
559
|
+
<span class='type'>(<tt><span class='object_link'><a href="Dictionary/Entry.html"
|
|
560
|
+
title="CSVDecision2::Dictionary::Entry (class)">Dictionary::Entry</a></span></tt>)</span>
|
|
561
|
+
|
|
562
|
+
|
|
563
|
+
|
|
564
|
+
—
|
|
565
|
+
<div class='inline'>
|
|
566
|
+
<p>Column dictionary entry.</p>
|
|
567
|
+
</div>
|
|
568
|
+
|
|
569
|
+
</li>
|
|
570
|
+
|
|
571
|
+
<li>
|
|
572
|
+
|
|
573
|
+
<span class='name'>matchers</span>
|
|
574
|
+
|
|
575
|
+
|
|
576
|
+
<span class='type'>(<tt>Array<<span class='object_link'><a href="Matchers/Matcher.html"
|
|
577
|
+
title="CSVDecision2::Matchers::Matcher (class)">Matchers::Matcher</a></span>></tt>)</span>
|
|
578
|
+
|
|
579
|
+
|
|
580
|
+
|
|
581
|
+
</li>
|
|
582
|
+
|
|
583
|
+
<li>
|
|
584
|
+
|
|
585
|
+
<span class='name'>cell</span>
|
|
586
|
+
|
|
587
|
+
|
|
588
|
+
<span class='type'>(<tt>String</tt>)</span>
|
|
589
|
+
|
|
590
|
+
|
|
591
|
+
|
|
592
|
+
</li>
|
|
593
|
+
|
|
594
|
+
</ul>
|
|
595
|
+
|
|
596
|
+
<p class="tag_title">Returns:</p>
|
|
597
|
+
<ul class="return">
|
|
598
|
+
|
|
599
|
+
<li>
|
|
600
|
+
|
|
601
|
+
|
|
602
|
+
<span class='type'>(<tt>false</tt>, <tt><span class='object_link'><a href="Matchers/Proc.html"
|
|
603
|
+
title="CSVDecision2::Matchers::Proc (class)">Matchers::Proc</a></span></tt>)</span>
|
|
513
604
|
|
|
514
605
|
|
|
515
|
-
|
|
516
|
-
</
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
<span class='type'>(<tt><span class='object_link'><a href="Dictionary/Entry.html" title="CSVDecision::Dictionary::Entry (class)">Dictionary::Entry</a></span></tt>)</span>
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
—
|
|
531
|
-
<div class='inline'>
|
|
532
|
-
<p>Column dictionary entry.</p>
|
|
533
|
-
</div>
|
|
534
|
-
|
|
535
|
-
</li>
|
|
536
|
-
|
|
537
|
-
<li>
|
|
538
|
-
|
|
539
|
-
<span class='name'>matchers</span>
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
<span class='type'>(<tt>Array<<span class='object_link'><a href="Matchers/Matcher.html" title="CSVDecision::Matchers::Matcher (class)">Matchers::Matcher</a></span>></tt>)</span>
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
</li>
|
|
547
|
-
|
|
548
|
-
<li>
|
|
549
|
-
|
|
550
|
-
<span class='name'>cell</span>
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
<span class='type'>(<tt>String</tt>)</span>
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
</li>
|
|
558
|
-
|
|
559
|
-
</ul>
|
|
560
|
-
|
|
561
|
-
<p class="tag_title">Returns:</p>
|
|
562
|
-
<ul class="return">
|
|
563
|
-
|
|
564
|
-
<li>
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
<span class='type'>(<tt>false</tt>, <tt><span class='object_link'><a href="Matchers/Proc.html" title="CSVDecision::Matchers::Proc (class)">Matchers::Proc</a></span></tt>)</span>
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
</li>
|
|
572
|
-
|
|
573
|
-
</ul>
|
|
574
|
-
|
|
575
|
-
</div><table class="source_code">
|
|
576
|
-
<tr>
|
|
577
|
-
<td>
|
|
578
|
-
<pre class="lines">
|
|
606
|
+
|
|
607
|
+
</li>
|
|
608
|
+
|
|
609
|
+
</ul>
|
|
610
|
+
|
|
611
|
+
</div>
|
|
612
|
+
<table class="source_code">
|
|
613
|
+
<tr>
|
|
614
|
+
<td>
|
|
615
|
+
<pre class="lines">
|
|
579
616
|
|
|
580
617
|
|
|
581
618
|
21
|
|
@@ -587,9 +624,9 @@
|
|
|
587
624
|
27
|
|
588
625
|
28
|
|
589
626
|
29</pre>
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
627
|
+
</td>
|
|
628
|
+
<td>
|
|
629
|
+
<pre class="code"><span class="info file"># File 'lib/csv_decision2/scan_row.rb', line 21</span>
|
|
593
630
|
|
|
594
631
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_scan'>scan</span><span class='lparen'>(</span><span class='label'>column:</span><span class='comma'>,</span> <span class='label'>matchers:</span><span class='comma'>,</span> <span class='label'>cell:</span><span class='rparen'>)</span>
|
|
595
632
|
<span class='kw'>return</span> <span class='kw'>false</span> <span class='kw'>if</span> <span class='id identifier rubyid_cell'>cell</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span>
|
|
@@ -600,83 +637,85 @@
|
|
|
600
637
|
<span class='comment'># Must be a simple string constant - this is OK except for a certain column types.
|
|
601
638
|
</span> <span class='id identifier rubyid_invalid_constant?'>invalid_constant?</span><span class='lparen'>(</span><span class='label'>type:</span> <span class='symbol'>:constant</span><span class='comma'>,</span> <span class='label'>column:</span> <span class='id identifier rubyid_column'>column</span><span class='rparen'>)</span>
|
|
602
639
|
<span class='kw'>end</span></pre>
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
</table>
|
|
606
|
-
</div>
|
|
607
|
-
|
|
608
|
-
</div>
|
|
640
|
+
</td>
|
|
641
|
+
</tr>
|
|
642
|
+
</table>
|
|
643
|
+
</div>
|
|
609
644
|
|
|
610
|
-
|
|
611
|
-
<h2>Instance Method Details</h2>
|
|
645
|
+
</div>
|
|
612
646
|
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
<h3 class="signature first" id="match?-instance_method">
|
|
616
|
-
|
|
617
|
-
#<strong>match?</strong>(row:, scan_cols:, hash:) ⇒ <tt>Boolean</tt>
|
|
618
|
-
|
|
647
|
+
<div id="instance_method_details" class="method_details_list">
|
|
648
|
+
<h2>Instance Method Details</h2>
|
|
619
649
|
|
|
620
|
-
|
|
621
650
|
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
<div class="discussion">
|
|
625
|
-
<p class="note private">
|
|
626
|
-
<strong>This method is part of a private API.</strong>
|
|
627
|
-
You should avoid using this method if possible, as it may be removed or be changed in the future.
|
|
628
|
-
</p>
|
|
651
|
+
<div class="method_details first">
|
|
652
|
+
<h3 class="signature first" id="match?-instance_method">
|
|
629
653
|
|
|
630
|
-
|
|
654
|
+
#<strong>match?</strong>(row:, scan_cols:, hash:) ⇒ <tt>Boolean</tt>
|
|
631
655
|
|
|
632
656
|
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
<
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
<p>
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
</
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
<
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
657
|
+
|
|
658
|
+
|
|
659
|
+
|
|
660
|
+
</h3>
|
|
661
|
+
<div class="docstring">
|
|
662
|
+
<div class="discussion">
|
|
663
|
+
<p class="note private">
|
|
664
|
+
<strong>This method is part of a private API.</strong>
|
|
665
|
+
You should avoid using this method if possible, as it may be removed or be changed in the future.
|
|
666
|
+
</p>
|
|
667
|
+
|
|
668
|
+
<p>Match cells in the input hash against a decision table row.</p>
|
|
669
|
+
|
|
670
|
+
|
|
671
|
+
</div>
|
|
672
|
+
</div>
|
|
673
|
+
<div class="tags">
|
|
674
|
+
<p class="tag_title">Parameters:</p>
|
|
675
|
+
<ul class="param">
|
|
676
|
+
|
|
677
|
+
<li>
|
|
678
|
+
|
|
679
|
+
<span class='name'>row</span>
|
|
680
|
+
|
|
681
|
+
|
|
682
|
+
<span class='type'>(<tt>Array<String></tt>)</span>
|
|
683
|
+
|
|
684
|
+
|
|
685
|
+
|
|
686
|
+
—
|
|
687
|
+
<div class='inline'>
|
|
688
|
+
<p>Data row - still just all string constants.</p>
|
|
689
|
+
</div>
|
|
690
|
+
|
|
691
|
+
</li>
|
|
692
|
+
|
|
693
|
+
</ul>
|
|
694
|
+
|
|
695
|
+
<p class="tag_title">Returns:</p>
|
|
696
|
+
<ul class="return">
|
|
697
|
+
|
|
698
|
+
<li>
|
|
699
|
+
|
|
700
|
+
|
|
701
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
|
702
|
+
|
|
703
|
+
|
|
704
|
+
|
|
705
|
+
—
|
|
706
|
+
<div class='inline'>
|
|
707
|
+
<p>True for a match, false otherwise.</p>
|
|
708
|
+
</div>
|
|
709
|
+
|
|
710
|
+
</li>
|
|
711
|
+
|
|
712
|
+
</ul>
|
|
713
|
+
|
|
714
|
+
</div>
|
|
715
|
+
<table class="source_code">
|
|
716
|
+
<tr>
|
|
717
|
+
<td>
|
|
718
|
+
<pre class="lines">
|
|
680
719
|
|
|
681
720
|
|
|
682
721
|
108
|
|
@@ -687,9 +726,9 @@
|
|
|
687
726
|
113
|
|
688
727
|
114
|
|
689
728
|
115</pre>
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
729
|
+
</td>
|
|
730
|
+
<td>
|
|
731
|
+
<pre class="code"><span class="info file"># File 'lib/csv_decision2/scan_row.rb', line 108</span>
|
|
693
732
|
|
|
694
733
|
<span class='kw'>def</span> <span class='id identifier rubyid_match?'>match?</span><span class='lparen'>(</span><span class='label'>row:</span><span class='comma'>,</span> <span class='label'>scan_cols:</span><span class='comma'>,</span> <span class='label'>hash:</span><span class='rparen'>)</span>
|
|
695
734
|
<span class='comment'># Check any table row cell constants first, and maybe fail fast...
|
|
@@ -699,111 +738,115 @@
|
|
|
699
738
|
</span> <span class='comment'># must all return a truthy value.
|
|
700
739
|
</span> <span class='ivar'>@procs</span><span class='period'>.</span><span class='id identifier rubyid_all?'>all?</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_col'>col</span><span class='op'>|</span> <span class='id identifier rubyid_row'>row</span><span class='lbracket'>[</span><span class='id identifier rubyid_col'>col</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='label'>value:</span> <span class='id identifier rubyid_scan_cols'>scan_cols</span><span class='lbracket'>[</span><span class='id identifier rubyid_col'>col</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='label'>hash:</span> <span class='id identifier rubyid_hash'>hash</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
|
|
701
740
|
<span class='kw'>end</span></pre>
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
</table>
|
|
705
|
-
</div>
|
|
706
|
-
|
|
707
|
-
<div class="method_details ">
|
|
708
|
-
<h3 class="signature " id="scan_columns-instance_method">
|
|
709
|
-
|
|
710
|
-
#<strong>scan_columns</strong>(row:, columns:, matchers:) ⇒ <tt>Array</tt>
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
</h3><div class="docstring">
|
|
717
|
-
<div class="discussion">
|
|
718
|
-
<p class="note private">
|
|
719
|
-
<strong>This method is part of a private API.</strong>
|
|
720
|
-
You should avoid using this method if possible, as it may be removed or be changed in the future.
|
|
721
|
-
</p>
|
|
722
|
-
|
|
723
|
-
<p>Scan all the specified <code>columns</code> (e.g., inputs) in the given
|
|
724
|
-
<code>data</code> row using the <code>matchers</code> array supplied.</p>
|
|
741
|
+
</td>
|
|
742
|
+
</tr>
|
|
743
|
+
</table>
|
|
744
|
+
</div>
|
|
725
745
|
|
|
746
|
+
<div class="method_details ">
|
|
747
|
+
<h3 class="signature " id="scan_columns-instance_method">
|
|
726
748
|
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
<
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
<
|
|
796
|
-
|
|
797
|
-
</div>
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
</ul>
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
749
|
+
#<strong>scan_columns</strong>(row:, columns:, matchers:) ⇒ <tt>Array</tt>
|
|
750
|
+
|
|
751
|
+
|
|
752
|
+
|
|
753
|
+
|
|
754
|
+
|
|
755
|
+
</h3>
|
|
756
|
+
<div class="docstring">
|
|
757
|
+
<div class="discussion">
|
|
758
|
+
<p class="note private">
|
|
759
|
+
<strong>This method is part of a private API.</strong>
|
|
760
|
+
You should avoid using this method if possible, as it may be removed or be changed in the future.
|
|
761
|
+
</p>
|
|
762
|
+
|
|
763
|
+
<p>Scan all the specified <code>columns</code> (e.g., inputs) in the given
|
|
764
|
+
<code>data</code> row using the <code>matchers</code> array supplied.
|
|
765
|
+
</p>
|
|
766
|
+
|
|
767
|
+
|
|
768
|
+
</div>
|
|
769
|
+
</div>
|
|
770
|
+
<div class="tags">
|
|
771
|
+
<p class="tag_title">Parameters:</p>
|
|
772
|
+
<ul class="param">
|
|
773
|
+
|
|
774
|
+
<li>
|
|
775
|
+
|
|
776
|
+
<span class='name'>row</span>
|
|
777
|
+
|
|
778
|
+
|
|
779
|
+
<span class='type'>(<tt>Array<String></tt>)</span>
|
|
780
|
+
|
|
781
|
+
|
|
782
|
+
|
|
783
|
+
—
|
|
784
|
+
<div class='inline'>
|
|
785
|
+
<p>Data row - still just all string constants.</p>
|
|
786
|
+
</div>
|
|
787
|
+
|
|
788
|
+
</li>
|
|
789
|
+
|
|
790
|
+
<li>
|
|
791
|
+
|
|
792
|
+
<span class='name'>columns</span>
|
|
793
|
+
|
|
794
|
+
|
|
795
|
+
<span class='type'>(<tt>Array<Columns::Entry></tt>)</span>
|
|
796
|
+
|
|
797
|
+
|
|
798
|
+
|
|
799
|
+
—
|
|
800
|
+
<div class='inline'>
|
|
801
|
+
<p>Array of column dictionary entries.</p>
|
|
802
|
+
</div>
|
|
803
|
+
|
|
804
|
+
</li>
|
|
805
|
+
|
|
806
|
+
<li>
|
|
807
|
+
|
|
808
|
+
<span class='name'>matchers</span>
|
|
809
|
+
|
|
810
|
+
|
|
811
|
+
<span class='type'>(<tt>Array<<span class='object_link'><a href="Matchers/Matcher.html"
|
|
812
|
+
title="CSVDecision2::Matchers::Matcher (class)">Matchers::Matcher</a></span>></tt>)</span>
|
|
813
|
+
|
|
814
|
+
|
|
815
|
+
|
|
816
|
+
—
|
|
817
|
+
<div class='inline'>
|
|
818
|
+
<p>Array of table cell matchers.</p>
|
|
819
|
+
</div>
|
|
820
|
+
|
|
821
|
+
</li>
|
|
822
|
+
|
|
823
|
+
</ul>
|
|
824
|
+
|
|
825
|
+
<p class="tag_title">Returns:</p>
|
|
826
|
+
<ul class="return">
|
|
827
|
+
|
|
828
|
+
<li>
|
|
829
|
+
|
|
830
|
+
|
|
831
|
+
<span class='type'>(<tt>Array</tt>)</span>
|
|
832
|
+
|
|
833
|
+
|
|
834
|
+
|
|
835
|
+
—
|
|
836
|
+
<div class='inline'>
|
|
837
|
+
<p>Data row with anything not a string constant replaced with a Proc or a
|
|
838
|
+
non-string constant.</p>
|
|
839
|
+
</div>
|
|
840
|
+
|
|
841
|
+
</li>
|
|
842
|
+
|
|
843
|
+
</ul>
|
|
844
|
+
|
|
845
|
+
</div>
|
|
846
|
+
<table class="source_code">
|
|
847
|
+
<tr>
|
|
848
|
+
<td>
|
|
849
|
+
<pre class="lines">
|
|
807
850
|
|
|
808
851
|
|
|
809
852
|
85
|
|
@@ -824,9 +867,9 @@ non-string constant.</p>
|
|
|
824
867
|
100
|
|
825
868
|
101
|
|
826
869
|
102</pre>
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
870
|
+
</td>
|
|
871
|
+
<td>
|
|
872
|
+
<pre class="code"><span class="info file"># File 'lib/csv_decision2/scan_row.rb', line 85</span>
|
|
830
873
|
|
|
831
874
|
<span class='kw'>def</span> <span class='id identifier rubyid_scan_columns'>scan_columns</span><span class='lparen'>(</span><span class='label'>row:</span><span class='comma'>,</span> <span class='label'>columns:</span><span class='comma'>,</span> <span class='label'>matchers:</span><span class='rparen'>)</span>
|
|
832
875
|
<span class='id identifier rubyid_columns'>columns</span><span class='period'>.</span><span class='id identifier rubyid_each_pair'>each_pair</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_col'>col</span><span class='comma'>,</span> <span class='id identifier rubyid_column'>column</span><span class='op'>|</span>
|
|
@@ -846,21 +889,22 @@ non-string constant.</p>
|
|
|
846
889
|
|
|
847
890
|
<span class='id identifier rubyid_row'>row</span>
|
|
848
891
|
<span class='kw'>end</span></pre>
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
</table>
|
|
852
|
-
</div>
|
|
853
|
-
|
|
854
|
-
</div>
|
|
892
|
+
</td>
|
|
893
|
+
</tr>
|
|
894
|
+
</table>
|
|
895
|
+
</div>
|
|
855
896
|
|
|
856
|
-
</div>
|
|
897
|
+
</div>
|
|
857
898
|
|
|
858
|
-
|
|
859
|
-
Generated on Sun Feb 11 10:26:08 2018 by
|
|
860
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
861
|
-
0.9.12 (ruby-2.4.0).
|
|
862
|
-
</div>
|
|
899
|
+
</div>
|
|
863
900
|
|
|
901
|
+
<div id="footer">
|
|
902
|
+
Generated on Sun Feb 11 10:26:08 2018 by
|
|
903
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
904
|
+
0.9.12 (ruby-2.4.0).
|
|
864
905
|
</div>
|
|
865
|
-
|
|
866
|
-
</
|
|
906
|
+
|
|
907
|
+
</div>
|
|
908
|
+
</body>
|
|
909
|
+
|
|
910
|
+
</html>
|