csv_decision 0.0.8 → 0.0.9
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/.rubocop.yml +3 -0
- data/CHANGELOG.md +4 -0
- data/README.md +62 -28
- data/csv_decision.gemspec +1 -1
- data/doc/CSVDecision/CellValidationError.html +2 -2
- data/doc/CSVDecision/Columns/Dictionary.html +114 -20
- data/doc/CSVDecision/Columns/Entry.html +2 -2
- data/doc/CSVDecision/Columns.html +109 -27
- data/doc/CSVDecision/Data.html +2 -2
- data/doc/CSVDecision/Decide.html +2 -2
- data/doc/CSVDecision/Decision.html +21 -21
- data/doc/CSVDecision/Dictionary/Entry.html +508 -0
- data/doc/CSVDecision/Dictionary.html +265 -0
- data/doc/CSVDecision/Error.html +2 -2
- data/doc/CSVDecision/FileError.html +3 -3
- data/doc/CSVDecision/Header.html +37 -136
- data/doc/CSVDecision/Input.html +2 -2
- data/doc/CSVDecision/Load.html +2 -2
- data/doc/CSVDecision/Matchers/Constant.html +2 -2
- data/doc/CSVDecision/Matchers/Function.html +2 -2
- data/doc/CSVDecision/Matchers/Guard.html +92 -25
- data/doc/CSVDecision/Matchers/Matcher.html +14 -18
- data/doc/CSVDecision/Matchers/Numeric.html +2 -2
- data/doc/CSVDecision/Matchers/Pattern.html +2 -2
- data/doc/CSVDecision/Matchers/Range.html +2 -2
- data/doc/CSVDecision/Matchers/Symbol.html +2 -2
- data/doc/CSVDecision/Matchers.html +5 -5
- data/doc/CSVDecision/Options.html +2 -2
- data/doc/CSVDecision/Parse.html +6 -4
- data/doc/CSVDecision/Result.html +944 -0
- data/doc/CSVDecision/ScanRow.html +70 -80
- data/doc/CSVDecision/Table.html +134 -54
- data/doc/CSVDecision.html +5 -5
- data/doc/_index.html +18 -4
- data/doc/class_list.html +1 -1
- data/doc/file.README.html +132 -62
- data/doc/index.html +132 -62
- data/doc/method_list.html +156 -60
- data/doc/top-level-namespace.html +2 -2
- data/lib/csv_decision/columns.rb +1 -8
- data/lib/csv_decision/decision.rb +45 -96
- data/lib/csv_decision/dictionary.rb +149 -0
- data/lib/csv_decision/header.rb +6 -133
- data/lib/csv_decision/matchers.rb +1 -2
- data/lib/csv_decision/parse.rb +18 -7
- data/lib/csv_decision/result.rb +180 -0
- data/lib/csv_decision/scan_row.rb +13 -7
- data/lib/csv_decision/table.rb +6 -5
- data/lib/csv_decision.rb +3 -1
- data/spec/csv_decision/columns_spec.rb +25 -4
- data/spec/csv_decision/examples_spec.rb +25 -0
- data/spec/csv_decision/matchers/guard_spec.rb +26 -9
- data/spec/csv_decision/table_spec.rb +48 -2
- metadata +7 -2
data/doc/CSVDecision/Data.html
CHANGED
@@ -469,9 +469,9 @@ array of arrays. Strips out empty columns/rows and comment cells.</p>
|
|
469
469
|
</div>
|
470
470
|
|
471
471
|
<div id="footer">
|
472
|
-
Generated on
|
472
|
+
Generated on Fri Jan 5 21:44:00 2018 by
|
473
473
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
474
|
-
0.9.12 (ruby-2.
|
474
|
+
0.9.12 (ruby-2.4.0).
|
475
475
|
</div>
|
476
476
|
|
477
477
|
</div>
|
data/doc/CSVDecision/Decide.html
CHANGED
@@ -428,9 +428,9 @@ hash. Otherwise a copy of the input hash is symbolized.</p>
|
|
428
428
|
</div>
|
429
429
|
|
430
430
|
<div id="footer">
|
431
|
-
Generated on
|
431
|
+
Generated on Fri Jan 5 21:44:00 2018 by
|
432
432
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
433
|
-
0.9.12 (ruby-2.
|
433
|
+
0.9.12 (ruby-2.4.0).
|
434
434
|
</div>
|
435
435
|
|
436
436
|
</div>
|
@@ -158,7 +158,7 @@
|
|
158
158
|
<li class="public ">
|
159
159
|
<span class="summary_signature">
|
160
160
|
|
161
|
-
<a href="#scan-instance_method" title="#scan (instance method)">#<strong>scan</strong>(table:, input:) ⇒
|
161
|
+
<a href="#scan-instance_method" title="#scan (instance method)">#<strong>scan</strong>(table:, input:) ⇒ {Symbol=>Object} </a>
|
162
162
|
|
163
163
|
|
164
164
|
|
@@ -262,24 +262,22 @@
|
|
262
262
|
21
|
263
263
|
22
|
264
264
|
23
|
265
|
-
24
|
266
|
-
25</pre>
|
265
|
+
24</pre>
|
267
266
|
</td>
|
268
267
|
<td>
|
269
268
|
<pre class="code"><span class="info file"># File 'lib/csv_decision/decision.rb', line 13</span>
|
270
269
|
|
271
270
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='label'>table:</span><span class='comma'>,</span> <span class='label'>input:</span><span class='rparen'>)</span>
|
272
|
-
<span class='
|
271
|
+
<span class='comment'># The result object is a hash of values, and each value will be an array if this is
|
272
|
+
</span> <span class='comment'># a multi-row result for the +first_match: false+ option.
|
273
|
+
</span> <span class='ivar'>@result</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="Result.html" title="CSVDecision::Result (class)">Result</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Result.html#initialize-instance_method" title="CSVDecision::Result#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='label'>table:</span> <span class='id identifier rubyid_table'>table</span><span class='comma'>,</span> <span class='label'>input:</span> <span class='id identifier rubyid_input'>input</span><span class='rparen'>)</span>
|
273
274
|
|
274
|
-
<span class='comment'>#
|
275
|
-
</span> <span class='
|
276
|
-
<span class='ivar'>@
|
277
|
-
<span class='ivar'>@outs_functions</span> <span class='op'>=</span> <span class='id identifier rubyid_table'>table</span><span class='period'>.</span><span class='id identifier rubyid_outs_functions'>outs_functions</span>
|
278
|
-
|
279
|
-
<span class='comment'># Partial result always includes the input hash for calculating output functions
|
280
|
-
</span> <span class='ivar'>@partial_result</span> <span class='op'>=</span> <span class='id identifier rubyid_input'>input</span><span class='lbracket'>[</span><span class='symbol'>:hash</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span> <span class='kw'>if</span> <span class='ivar'>@outs_functions</span>
|
275
|
+
<span class='comment'># All rows picked by the matching process. An array if +first_match: false+, otherwise
|
276
|
+
</span> <span class='comment'># a single row.
|
277
|
+
</span> <span class='ivar'>@rows_picked</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
281
278
|
|
282
|
-
<span class='
|
279
|
+
<span class='comment'># Relevant table attributes
|
280
|
+
</span> <span class='id identifier rubyid_table_attributes'>table_attributes</span><span class='lparen'>(</span><span class='id identifier rubyid_table'>table</span><span class='rparen'>)</span>
|
283
281
|
<span class='kw'>end</span></pre>
|
284
282
|
</td>
|
285
283
|
</tr>
|
@@ -296,7 +294,7 @@
|
|
296
294
|
<div class="method_details first">
|
297
295
|
<h3 class="signature first" id="scan-instance_method">
|
298
296
|
|
299
|
-
#<strong>scan</strong>(table:, input:) ⇒ <tt>
|
297
|
+
#<strong>scan</strong>(table:, input:) ⇒ <tt>{Symbol=>Object}</tt>
|
300
298
|
|
301
299
|
|
302
300
|
|
@@ -358,13 +356,13 @@
|
|
358
356
|
<li>
|
359
357
|
|
360
358
|
|
361
|
-
<span class='type'>(<tt>
|
359
|
+
<span class='type'>(<tt>{Symbol=>Object}</tt>)</span>
|
362
360
|
|
363
361
|
|
364
362
|
|
365
363
|
—
|
366
364
|
<div class='inline'>
|
367
|
-
<p>Decision
|
365
|
+
<p>Decision result.</p>
|
368
366
|
</div>
|
369
367
|
|
370
368
|
</li>
|
@@ -377,20 +375,22 @@
|
|
377
375
|
<pre class="lines">
|
378
376
|
|
379
377
|
|
378
|
+
30
|
379
|
+
31
|
380
380
|
32
|
381
381
|
33
|
382
382
|
34
|
383
383
|
35
|
384
384
|
36
|
385
|
-
37
|
386
|
-
38</pre>
|
385
|
+
37</pre>
|
387
386
|
</td>
|
388
387
|
<td>
|
389
|
-
<pre class="code"><span class="info file"># File 'lib/csv_decision/decision.rb', line
|
388
|
+
<pre class="code"><span class="info file"># File 'lib/csv_decision/decision.rb', line 30</span>
|
390
389
|
|
391
390
|
<span class='kw'>def</span> <span class='id identifier rubyid_scan'>scan</span><span class='lparen'>(</span><span class='label'>table:</span><span class='comma'>,</span> <span class='label'>input:</span><span class='rparen'>)</span>
|
392
391
|
<span class='id identifier rubyid_table'>table</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_row'>row</span><span class='comma'>,</span> <span class='id identifier rubyid_index'>index</span><span class='op'>|</span>
|
393
|
-
<span class='
|
392
|
+
<span class='comment'># +row_scan+ returns false if more rows need to be scanned, truthy otherwise.
|
393
|
+
</span> <span class='kw'>return</span> <span class='id identifier rubyid_result'>result</span> <span class='kw'>if</span> <span class='id identifier rubyid_row_scan'>row_scan</span><span class='lparen'>(</span><span class='label'>input:</span> <span class='id identifier rubyid_input'>input</span><span class='comma'>,</span> <span class='label'>row:</span> <span class='id identifier rubyid_row'>row</span><span class='comma'>,</span> <span class='label'>scan_row:</span> <span class='id identifier rubyid_table'>table</span><span class='period'>.</span><span class='id identifier rubyid_scan_rows'>scan_rows</span><span class='lbracket'>[</span><span class='id identifier rubyid_index'>index</span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
394
394
|
<span class='kw'>end</span>
|
395
395
|
|
396
396
|
<span class='id identifier rubyid_result'>result</span>
|
@@ -405,9 +405,9 @@
|
|
405
405
|
</div>
|
406
406
|
|
407
407
|
<div id="footer">
|
408
|
-
Generated on
|
408
|
+
Generated on Fri Jan 5 21:44:00 2018 by
|
409
409
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
410
|
-
0.9.12 (ruby-2.
|
410
|
+
0.9.12 (ruby-2.4.0).
|
411
411
|
</div>
|
412
412
|
|
413
413
|
</div>
|
@@ -0,0 +1,508 @@
|
|
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::Dictionary::Entry
|
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::Dictionary::Entry";
|
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 (E)</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="../Dictionary.html" title="CSVDecision::Dictionary (module)">Dictionary</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">Entry</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::Dictionary::Entry
|
63
|
+
|
64
|
+
|
65
|
+
<span class="private note title">Private</span>
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
<dl>
|
70
|
+
<dt>Inherits:</dt>
|
71
|
+
<dd>
|
72
|
+
<span class="inheritName">Struct</span>
|
73
|
+
|
74
|
+
<ul class="fullTree">
|
75
|
+
<li>Object</li>
|
76
|
+
|
77
|
+
<li class="next">Struct</li>
|
78
|
+
|
79
|
+
<li class="next">CSVDecision::Dictionary::Entry</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/dictionary.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>Value object to hold column dictionary entries.</p>
|
112
|
+
|
113
|
+
|
114
|
+
</div>
|
115
|
+
</div>
|
116
|
+
<div class="tags">
|
117
|
+
|
118
|
+
|
119
|
+
</div>
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
124
|
+
<ul class="summary">
|
125
|
+
|
126
|
+
<li class="public ">
|
127
|
+
<span class="summary_signature">
|
128
|
+
|
129
|
+
<a href="#eval-instance_method" title="#eval (instance method)">#<strong>eval</strong> ⇒ Object </a>
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
</span>
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
<span class="summary_desc"><div class='inline'>
|
147
|
+
<p>Returns the value of attribute eval.</p>
|
148
|
+
</div></span>
|
149
|
+
|
150
|
+
</li>
|
151
|
+
|
152
|
+
|
153
|
+
<li class="public ">
|
154
|
+
<span class="summary_signature">
|
155
|
+
|
156
|
+
<a href="#name-instance_method" title="#name (instance method)">#<strong>name</strong> ⇒ Object </a>
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
</span>
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
<span class="summary_desc"><div class='inline'>
|
174
|
+
<p>Returns the value of attribute name.</p>
|
175
|
+
</div></span>
|
176
|
+
|
177
|
+
</li>
|
178
|
+
|
179
|
+
|
180
|
+
<li class="public ">
|
181
|
+
<span class="summary_signature">
|
182
|
+
|
183
|
+
<a href="#type-instance_method" title="#type (instance method)">#<strong>type</strong> ⇒ Object </a>
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
</span>
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
<span class="summary_desc"><div class='inline'>
|
201
|
+
<p>Returns the value of attribute type.</p>
|
202
|
+
</div></span>
|
203
|
+
|
204
|
+
</li>
|
205
|
+
|
206
|
+
|
207
|
+
</ul>
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
<h2>
|
214
|
+
Instance Method Summary
|
215
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
216
|
+
</h2>
|
217
|
+
|
218
|
+
<ul class="summary">
|
219
|
+
|
220
|
+
<li class="public ">
|
221
|
+
<span class="summary_signature">
|
222
|
+
|
223
|
+
<a href="#ins%3F-instance_method" title="#ins? (instance method)">#<strong>ins?</strong> ⇒ Boolean </a>
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
</span>
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
|
234
|
+
<span class="private note title">private</span>
|
235
|
+
|
236
|
+
|
237
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
238
|
+
|
239
|
+
</li>
|
240
|
+
|
241
|
+
|
242
|
+
</ul>
|
243
|
+
|
244
|
+
|
245
|
+
|
246
|
+
|
247
|
+
<div id="instance_attr_details" class="attr_details">
|
248
|
+
<h2>Instance Attribute Details</h2>
|
249
|
+
|
250
|
+
|
251
|
+
<span id="eval=-instance_method"></span>
|
252
|
+
<div class="method_details first">
|
253
|
+
<h3 class="signature first" id="eval-instance_method">
|
254
|
+
|
255
|
+
#<strong>eval</strong> ⇒ <tt>Object</tt>
|
256
|
+
|
257
|
+
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
</h3><div class="docstring">
|
262
|
+
<div class="discussion">
|
263
|
+
|
264
|
+
<p>Returns the value of attribute eval</p>
|
265
|
+
|
266
|
+
|
267
|
+
</div>
|
268
|
+
</div>
|
269
|
+
<div class="tags">
|
270
|
+
|
271
|
+
<p class="tag_title">Returns:</p>
|
272
|
+
<ul class="return">
|
273
|
+
|
274
|
+
<li>
|
275
|
+
|
276
|
+
|
277
|
+
<span class='type'>(<tt>Object</tt>)</span>
|
278
|
+
|
279
|
+
|
280
|
+
|
281
|
+
—
|
282
|
+
<div class='inline'>
|
283
|
+
<p>the current value of eval</p>
|
284
|
+
</div>
|
285
|
+
|
286
|
+
</li>
|
287
|
+
|
288
|
+
</ul>
|
289
|
+
|
290
|
+
</div><table class="source_code">
|
291
|
+
<tr>
|
292
|
+
<td>
|
293
|
+
<pre class="lines">
|
294
|
+
|
295
|
+
|
296
|
+
23
|
297
|
+
24
|
298
|
+
25</pre>
|
299
|
+
</td>
|
300
|
+
<td>
|
301
|
+
<pre class="code"><span class="info file"># File 'lib/csv_decision/dictionary.rb', line 23</span>
|
302
|
+
|
303
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_eval'>eval</span>
|
304
|
+
<span class='ivar'>@eval</span>
|
305
|
+
<span class='kw'>end</span></pre>
|
306
|
+
</td>
|
307
|
+
</tr>
|
308
|
+
</table>
|
309
|
+
</div>
|
310
|
+
|
311
|
+
|
312
|
+
<span id="name=-instance_method"></span>
|
313
|
+
<div class="method_details ">
|
314
|
+
<h3 class="signature " id="name-instance_method">
|
315
|
+
|
316
|
+
#<strong>name</strong> ⇒ <tt>Object</tt>
|
317
|
+
|
318
|
+
|
319
|
+
|
320
|
+
|
321
|
+
|
322
|
+
</h3><div class="docstring">
|
323
|
+
<div class="discussion">
|
324
|
+
|
325
|
+
<p>Returns the value of attribute name</p>
|
326
|
+
|
327
|
+
|
328
|
+
</div>
|
329
|
+
</div>
|
330
|
+
<div class="tags">
|
331
|
+
|
332
|
+
<p class="tag_title">Returns:</p>
|
333
|
+
<ul class="return">
|
334
|
+
|
335
|
+
<li>
|
336
|
+
|
337
|
+
|
338
|
+
<span class='type'>(<tt>Object</tt>)</span>
|
339
|
+
|
340
|
+
|
341
|
+
|
342
|
+
—
|
343
|
+
<div class='inline'>
|
344
|
+
<p>the current value of name</p>
|
345
|
+
</div>
|
346
|
+
|
347
|
+
</li>
|
348
|
+
|
349
|
+
</ul>
|
350
|
+
|
351
|
+
</div><table class="source_code">
|
352
|
+
<tr>
|
353
|
+
<td>
|
354
|
+
<pre class="lines">
|
355
|
+
|
356
|
+
|
357
|
+
23
|
358
|
+
24
|
359
|
+
25</pre>
|
360
|
+
</td>
|
361
|
+
<td>
|
362
|
+
<pre class="code"><span class="info file"># File 'lib/csv_decision/dictionary.rb', line 23</span>
|
363
|
+
|
364
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_name'>name</span>
|
365
|
+
<span class='ivar'>@name</span>
|
366
|
+
<span class='kw'>end</span></pre>
|
367
|
+
</td>
|
368
|
+
</tr>
|
369
|
+
</table>
|
370
|
+
</div>
|
371
|
+
|
372
|
+
|
373
|
+
<span id="type=-instance_method"></span>
|
374
|
+
<div class="method_details ">
|
375
|
+
<h3 class="signature " id="type-instance_method">
|
376
|
+
|
377
|
+
#<strong>type</strong> ⇒ <tt>Object</tt>
|
378
|
+
|
379
|
+
|
380
|
+
|
381
|
+
|
382
|
+
|
383
|
+
</h3><div class="docstring">
|
384
|
+
<div class="discussion">
|
385
|
+
|
386
|
+
<p>Returns the value of attribute type</p>
|
387
|
+
|
388
|
+
|
389
|
+
</div>
|
390
|
+
</div>
|
391
|
+
<div class="tags">
|
392
|
+
|
393
|
+
<p class="tag_title">Returns:</p>
|
394
|
+
<ul class="return">
|
395
|
+
|
396
|
+
<li>
|
397
|
+
|
398
|
+
|
399
|
+
<span class='type'>(<tt>Object</tt>)</span>
|
400
|
+
|
401
|
+
|
402
|
+
|
403
|
+
—
|
404
|
+
<div class='inline'>
|
405
|
+
<p>the current value of type</p>
|
406
|
+
</div>
|
407
|
+
|
408
|
+
</li>
|
409
|
+
|
410
|
+
</ul>
|
411
|
+
|
412
|
+
</div><table class="source_code">
|
413
|
+
<tr>
|
414
|
+
<td>
|
415
|
+
<pre class="lines">
|
416
|
+
|
417
|
+
|
418
|
+
23
|
419
|
+
24
|
420
|
+
25</pre>
|
421
|
+
</td>
|
422
|
+
<td>
|
423
|
+
<pre class="code"><span class="info file"># File 'lib/csv_decision/dictionary.rb', line 23</span>
|
424
|
+
|
425
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_type'>type</span>
|
426
|
+
<span class='ivar'>@type</span>
|
427
|
+
<span class='kw'>end</span></pre>
|
428
|
+
</td>
|
429
|
+
</tr>
|
430
|
+
</table>
|
431
|
+
</div>
|
432
|
+
|
433
|
+
</div>
|
434
|
+
|
435
|
+
|
436
|
+
<div id="instance_method_details" class="method_details_list">
|
437
|
+
<h2>Instance Method Details</h2>
|
438
|
+
|
439
|
+
|
440
|
+
<div class="method_details first">
|
441
|
+
<h3 class="signature first" id="ins?-instance_method">
|
442
|
+
|
443
|
+
#<strong>ins?</strong> ⇒ <tt>Boolean</tt>
|
444
|
+
|
445
|
+
|
446
|
+
|
447
|
+
|
448
|
+
|
449
|
+
</h3><div class="docstring">
|
450
|
+
<div class="discussion">
|
451
|
+
<p class="note private">
|
452
|
+
<strong>This method is part of a private API.</strong>
|
453
|
+
You should avoid using this method if possible, as it may be removed or be changed in the future.
|
454
|
+
</p>
|
455
|
+
|
456
|
+
|
457
|
+
</div>
|
458
|
+
</div>
|
459
|
+
<div class="tags">
|
460
|
+
|
461
|
+
<p class="tag_title">Returns:</p>
|
462
|
+
<ul class="return">
|
463
|
+
|
464
|
+
<li>
|
465
|
+
|
466
|
+
|
467
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
468
|
+
|
469
|
+
|
470
|
+
|
471
|
+
</li>
|
472
|
+
|
473
|
+
</ul>
|
474
|
+
|
475
|
+
</div><table class="source_code">
|
476
|
+
<tr>
|
477
|
+
<td>
|
478
|
+
<pre class="lines">
|
479
|
+
|
480
|
+
|
481
|
+
24
|
482
|
+
25
|
483
|
+
26</pre>
|
484
|
+
</td>
|
485
|
+
<td>
|
486
|
+
<pre class="code"><span class="info file"># File 'lib/csv_decision/dictionary.rb', line 24</span>
|
487
|
+
|
488
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_ins?'>ins?</span>
|
489
|
+
<span class='qsymbols_beg'>%i[</span><span class='tstring_content'>in</span><span class='words_sep'> </span><span class='tstring_content'>guard</span><span class='words_sep'>]</span><span class='period'>.</span><span class='id identifier rubyid_member?'>member?</span><span class='lparen'>(</span><span class='id identifier rubyid_type'>type</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='kw'>true</span> <span class='op'>:</span> <span class='kw'>false</span>
|
490
|
+
<span class='kw'>end</span></pre>
|
491
|
+
</td>
|
492
|
+
</tr>
|
493
|
+
</table>
|
494
|
+
</div>
|
495
|
+
|
496
|
+
</div>
|
497
|
+
|
498
|
+
</div>
|
499
|
+
|
500
|
+
<div id="footer">
|
501
|
+
Generated on Fri Jan 5 21:44:01 2018 by
|
502
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
503
|
+
0.9.12 (ruby-2.4.0).
|
504
|
+
</div>
|
505
|
+
|
506
|
+
</div>
|
507
|
+
</body>
|
508
|
+
</html>
|