cw 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/.yardoc/checksums +33 -0
- data/.yardoc/object_types +0 -0
- data/.yardoc/objects/root.dat +0 -0
- data/.yardoc/proxy_types +0 -0
- data/cw.gemspec +1 -1
- data/doc/Alphabet.html +433 -0
- data/doc/AudioPlayer.html +805 -0
- data/doc/Book.html +3134 -0
- data/doc/BookDetails.html +664 -0
- data/doc/CW.html +849 -0
- data/doc/CWThreads.html +514 -0
- data/doc/Cl.html +1125 -0
- data/doc/CurrentWord.html +636 -0
- data/doc/CwDsl.html +1871 -0
- data/doc/CwEncoding.html +329 -0
- data/doc/FileDetails.html +236 -0
- data/doc/KeyInput.html +758 -0
- data/doc/MonitorKeys.html +482 -0
- data/doc/Numbers.html +433 -0
- data/doc/Params.html +352 -0
- data/doc/Print.html +1130 -0
- data/doc/Print/ProgressPrint.html +419 -0
- data/doc/Process.html +202 -0
- data/doc/Progress.html +337 -0
- data/doc/Randomize.html +959 -0
- data/doc/RepeatWord.html +816 -0
- data/doc/Rss.html +630 -0
- data/doc/Sentence.html +1457 -0
- data/doc/Spoken.html +215 -0
- data/doc/Str.html +771 -0
- data/doc/Stream.html +1401 -0
- data/doc/TestLetters.html +586 -0
- data/doc/TestWords.html +646 -0
- data/doc/Tester.html +3064 -0
- data/doc/Timing.html +1244 -0
- data/doc/ToneGenerator.html +2111 -0
- data/doc/Voice.html +273 -0
- data/doc/Words.html +1750 -0
- data/doc/_index.html +376 -0
- data/doc/class_list.html +58 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +57 -0
- data/doc/css/style.css +339 -0
- data/doc/file.README.html +148 -0
- data/doc/file_list.html +60 -0
- data/doc/frames.html +26 -0
- data/doc/index.html +148 -0
- data/doc/js/app.js +219 -0
- data/doc/js/full_list.js +181 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +2697 -0
- data/doc/monitor.html +435 -0
- data/doc/top-level-namespace.html +114 -0
- metadata +53 -1
data/doc/Voice.html
ADDED
@@ -0,0 +1,273 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
+
<title>
|
7
|
+
Class: Voice
|
8
|
+
|
9
|
+
— Documentation by YARD 0.8.7.6
|
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
|
+
hasFrames = window.top.frames.main ? true : false;
|
19
|
+
relpath = '';
|
20
|
+
framesUrl = "frames.html#!Voice.html";
|
21
|
+
</script>
|
22
|
+
|
23
|
+
|
24
|
+
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
25
|
+
|
26
|
+
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
27
|
+
|
28
|
+
|
29
|
+
</head>
|
30
|
+
<body>
|
31
|
+
<div id="header">
|
32
|
+
<div id="menu">
|
33
|
+
|
34
|
+
<a href="_index.html">Index (V)</a> »
|
35
|
+
|
36
|
+
|
37
|
+
<span class="title">Voice</span>
|
38
|
+
|
39
|
+
|
40
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
41
|
+
</div>
|
42
|
+
|
43
|
+
<div id="search">
|
44
|
+
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
46
|
+
href="class_list.html">
|
47
|
+
Class List
|
48
|
+
</a>
|
49
|
+
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
51
|
+
href="method_list.html">
|
52
|
+
Method List
|
53
|
+
</a>
|
54
|
+
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
56
|
+
href="file_list.html">
|
57
|
+
File List
|
58
|
+
</a>
|
59
|
+
|
60
|
+
</div>
|
61
|
+
<div class="clear"></div>
|
62
|
+
</div>
|
63
|
+
|
64
|
+
<iframe id="search_frame"></iframe>
|
65
|
+
|
66
|
+
<div id="content"><h1>Class: Voice
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
</h1>
|
71
|
+
|
72
|
+
<dl class="box">
|
73
|
+
|
74
|
+
<dt class="r1">Inherits:</dt>
|
75
|
+
<dd class="r1">
|
76
|
+
<span class="inheritName">Object</span>
|
77
|
+
|
78
|
+
<ul class="fullTree">
|
79
|
+
<li>Object</li>
|
80
|
+
|
81
|
+
<li class="next">Voice</li>
|
82
|
+
|
83
|
+
</ul>
|
84
|
+
<a href="#" class="inheritanceTree">show all</a>
|
85
|
+
|
86
|
+
</dd>
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
<dt class="r2 last">Defined in:</dt>
|
97
|
+
<dd class="r2 last">lib/cw/voice.rb</dd>
|
98
|
+
|
99
|
+
</dl>
|
100
|
+
<div class="clear"></div>
|
101
|
+
|
102
|
+
<h2>Overview</h2><div class="docstring">
|
103
|
+
<div class="discussion">
|
104
|
+
|
105
|
+
<p>class Speak speaks with a voice</p>
|
106
|
+
|
107
|
+
|
108
|
+
</div>
|
109
|
+
</div>
|
110
|
+
<div class="tags">
|
111
|
+
|
112
|
+
|
113
|
+
</div>
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
<h2>
|
122
|
+
Instance Method Summary
|
123
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
124
|
+
</h2>
|
125
|
+
|
126
|
+
<ul class="summary">
|
127
|
+
|
128
|
+
<li class="public ">
|
129
|
+
<span class="summary_signature">
|
130
|
+
|
131
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (Voice) <strong>initialize</strong>(options = {}) </a>
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
</span>
|
136
|
+
|
137
|
+
|
138
|
+
<span class="note title constructor">constructor</span>
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
<span class="summary_desc"><div class='inline'>
|
148
|
+
<p>A new instance of Voice.</p>
|
149
|
+
</div></span>
|
150
|
+
|
151
|
+
</li>
|
152
|
+
|
153
|
+
|
154
|
+
<li class="public ">
|
155
|
+
<span class="summary_signature">
|
156
|
+
|
157
|
+
<a href="#say-instance_method" title="#say (instance method)">- (Object) <strong>say</strong>(words, rate = 300, voice = 'bruce') </a>
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
</span>
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
172
|
+
|
173
|
+
</li>
|
174
|
+
|
175
|
+
|
176
|
+
</ul>
|
177
|
+
|
178
|
+
|
179
|
+
<div id="constructor_details" class="method_details_list">
|
180
|
+
<h2>Constructor Details</h2>
|
181
|
+
|
182
|
+
<div class="method_details first">
|
183
|
+
<h3 class="signature first" id="initialize-instance_method">
|
184
|
+
|
185
|
+
- (<tt><span class='object_link'><a href="" title="Voice (class)">Voice</a></span></tt>) <strong>initialize</strong>(options = {})
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
</h3><div class="docstring">
|
192
|
+
<div class="discussion">
|
193
|
+
|
194
|
+
<p>Returns a new instance of Voice</p>
|
195
|
+
|
196
|
+
|
197
|
+
</div>
|
198
|
+
</div>
|
199
|
+
<div class="tags">
|
200
|
+
|
201
|
+
|
202
|
+
</div><table class="source_code">
|
203
|
+
<tr>
|
204
|
+
<td>
|
205
|
+
<pre class="lines">
|
206
|
+
|
207
|
+
|
208
|
+
7
|
209
|
+
8
|
210
|
+
9</pre>
|
211
|
+
</td>
|
212
|
+
<td>
|
213
|
+
<pre class="code"><span class="info file"># File 'lib/cw/voice.rb', line 7</span>
|
214
|
+
|
215
|
+
<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>
|
216
|
+
<span class='ivar'>@options</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span>
|
217
|
+
<span class='kw'>end</span></pre>
|
218
|
+
</td>
|
219
|
+
</tr>
|
220
|
+
</table>
|
221
|
+
</div>
|
222
|
+
|
223
|
+
</div>
|
224
|
+
|
225
|
+
|
226
|
+
<div id="instance_method_details" class="method_details_list">
|
227
|
+
<h2>Instance Method Details</h2>
|
228
|
+
|
229
|
+
|
230
|
+
<div class="method_details first">
|
231
|
+
<h3 class="signature first" id="say-instance_method">
|
232
|
+
|
233
|
+
- (<tt>Object</tt>) <strong>say</strong>(words, rate = 300, voice = 'bruce')
|
234
|
+
|
235
|
+
|
236
|
+
|
237
|
+
|
238
|
+
|
239
|
+
</h3><table class="source_code">
|
240
|
+
<tr>
|
241
|
+
<td>
|
242
|
+
<pre class="lines">
|
243
|
+
|
244
|
+
|
245
|
+
11
|
246
|
+
12
|
247
|
+
13
|
248
|
+
14</pre>
|
249
|
+
</td>
|
250
|
+
<td>
|
251
|
+
<pre class="code"><span class="info file"># File 'lib/cw/voice.rb', line 11</span>
|
252
|
+
|
253
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_say'>say</span> <span class='id identifier rubyid_words'>words</span><span class='comma'>,</span> <span class='id identifier rubyid_rate'>rate</span> <span class='op'>=</span> <span class='int'>300</span><span class='comma'>,</span> <span class='id identifier rubyid_voice'>voice</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>bruce</span><span class='tstring_end'>'</span></span>
|
254
|
+
<span class='id identifier rubyid_system'>system</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>say </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_words'>words</span><span class='embexpr_end'>}</span><span class='tstring_content'> -ospoken.wave -r</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_rate'>rate</span><span class='embexpr_end'>}</span><span class='tstring_content'> -v</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_voice'>voice</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
255
|
+
<span class='id identifier rubyid_system'>system</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>afplay spoken.wave</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
256
|
+
<span class='kw'>end</span></pre>
|
257
|
+
</td>
|
258
|
+
</tr>
|
259
|
+
</table>
|
260
|
+
</div>
|
261
|
+
|
262
|
+
</div>
|
263
|
+
|
264
|
+
</div>
|
265
|
+
|
266
|
+
<div id="footer">
|
267
|
+
Generated on Mon May 23 21:20:16 2016 by
|
268
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
269
|
+
0.8.7.6 (ruby-2.2.0).
|
270
|
+
</div>
|
271
|
+
|
272
|
+
</body>
|
273
|
+
</html>
|
data/doc/Words.html
ADDED
@@ -0,0 +1,1750 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
+
<title>
|
7
|
+
Class: Words
|
8
|
+
|
9
|
+
— Documentation by YARD 0.8.7.6
|
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
|
+
hasFrames = window.top.frames.main ? true : false;
|
19
|
+
relpath = '';
|
20
|
+
framesUrl = "frames.html#!Words.html";
|
21
|
+
</script>
|
22
|
+
|
23
|
+
|
24
|
+
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
25
|
+
|
26
|
+
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
27
|
+
|
28
|
+
|
29
|
+
</head>
|
30
|
+
<body>
|
31
|
+
<div id="header">
|
32
|
+
<div id="menu">
|
33
|
+
|
34
|
+
<a href="_index.html">Index (W)</a> »
|
35
|
+
|
36
|
+
|
37
|
+
<span class="title">Words</span>
|
38
|
+
|
39
|
+
|
40
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
41
|
+
</div>
|
42
|
+
|
43
|
+
<div id="search">
|
44
|
+
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
46
|
+
href="class_list.html">
|
47
|
+
Class List
|
48
|
+
</a>
|
49
|
+
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
51
|
+
href="method_list.html">
|
52
|
+
Method List
|
53
|
+
</a>
|
54
|
+
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
56
|
+
href="file_list.html">
|
57
|
+
File List
|
58
|
+
</a>
|
59
|
+
|
60
|
+
</div>
|
61
|
+
<div class="clear"></div>
|
62
|
+
</div>
|
63
|
+
|
64
|
+
<iframe id="search_frame"></iframe>
|
65
|
+
|
66
|
+
<div id="content"><h1>Class: Words
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
</h1>
|
71
|
+
|
72
|
+
<dl class="box">
|
73
|
+
|
74
|
+
<dt class="r1">Inherits:</dt>
|
75
|
+
<dd class="r1">
|
76
|
+
<span class="inheritName">Object</span>
|
77
|
+
|
78
|
+
<ul class="fullTree">
|
79
|
+
<li>Object</li>
|
80
|
+
|
81
|
+
<li class="next">Words</li>
|
82
|
+
|
83
|
+
</ul>
|
84
|
+
<a href="#" class="inheritanceTree">show all</a>
|
85
|
+
|
86
|
+
</dd>
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
<dt class="r2 last">Defined in:</dt>
|
97
|
+
<dd class="r2 last">lib/cw/words.rb</dd>
|
98
|
+
|
99
|
+
</dl>
|
100
|
+
<div class="clear"></div>
|
101
|
+
|
102
|
+
<h2>Overview</h2><div class="docstring">
|
103
|
+
<div class="discussion">
|
104
|
+
|
105
|
+
<p>class Words deals with words</p>
|
106
|
+
|
107
|
+
|
108
|
+
</div>
|
109
|
+
</div>
|
110
|
+
<div class="tags">
|
111
|
+
|
112
|
+
|
113
|
+
</div>
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
<h2>
|
122
|
+
Instance Method Summary
|
123
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
124
|
+
</h2>
|
125
|
+
|
126
|
+
<ul class="summary">
|
127
|
+
|
128
|
+
<li class="public ">
|
129
|
+
<span class="summary_signature">
|
130
|
+
|
131
|
+
<a href="#add-instance_method" title="#add (instance method)">- (Object) <strong>add</strong>(words) </a>
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
</span>
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
146
|
+
|
147
|
+
</li>
|
148
|
+
|
149
|
+
|
150
|
+
<li class="public ">
|
151
|
+
<span class="summary_signature">
|
152
|
+
|
153
|
+
<a href="#all-instance_method" title="#all (instance method)">- (Object) <strong>all</strong> </a>
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
</span>
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
168
|
+
|
169
|
+
</li>
|
170
|
+
|
171
|
+
|
172
|
+
<li class="public ">
|
173
|
+
<span class="summary_signature">
|
174
|
+
|
175
|
+
<a href="#alphabet-instance_method" title="#alphabet (instance method)">- (Object) <strong>alphabet</strong>(options = {reverse: nil}) </a>
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
</span>
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
190
|
+
|
191
|
+
</li>
|
192
|
+
|
193
|
+
|
194
|
+
<li class="public ">
|
195
|
+
<span class="summary_signature">
|
196
|
+
|
197
|
+
<a href="#assign-instance_method" title="#assign (instance method)">- (Object) <strong>assign</strong>(words) </a>
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
</span>
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
212
|
+
|
213
|
+
</li>
|
214
|
+
|
215
|
+
|
216
|
+
<li class="public ">
|
217
|
+
<span class="summary_signature">
|
218
|
+
|
219
|
+
<a href="#beginning_with-instance_method" title="#beginning_with (instance method)">- (Object) <strong>beginning_with</strong>(*letters) </a>
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
</span>
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
234
|
+
|
235
|
+
</li>
|
236
|
+
|
237
|
+
|
238
|
+
<li class="public ">
|
239
|
+
<span class="summary_signature">
|
240
|
+
|
241
|
+
<a href="#beginning_with_letter-instance_method" title="#beginning_with_letter (instance method)">- (Object) <strong>beginning_with_letter</strong>(letr) </a>
|
242
|
+
|
243
|
+
|
244
|
+
|
245
|
+
</span>
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
256
|
+
|
257
|
+
</li>
|
258
|
+
|
259
|
+
|
260
|
+
<li class="public ">
|
261
|
+
<span class="summary_signature">
|
262
|
+
|
263
|
+
<a href="#collect_words-instance_method" title="#collect_words (instance method)">- (Object) <strong>collect_words</strong> </a>
|
264
|
+
|
265
|
+
|
266
|
+
|
267
|
+
</span>
|
268
|
+
|
269
|
+
|
270
|
+
|
271
|
+
|
272
|
+
|
273
|
+
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
278
|
+
|
279
|
+
</li>
|
280
|
+
|
281
|
+
|
282
|
+
<li class="public ">
|
283
|
+
<span class="summary_signature">
|
284
|
+
|
285
|
+
<a href="#count-instance_method" title="#count (instance method)">- (Object) <strong>count</strong>(word_count) </a>
|
286
|
+
|
287
|
+
|
288
|
+
|
289
|
+
</span>
|
290
|
+
|
291
|
+
|
292
|
+
|
293
|
+
|
294
|
+
|
295
|
+
|
296
|
+
|
297
|
+
|
298
|
+
|
299
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
300
|
+
|
301
|
+
</li>
|
302
|
+
|
303
|
+
|
304
|
+
<li class="public ">
|
305
|
+
<span class="summary_signature">
|
306
|
+
|
307
|
+
<a href="#double_words-instance_method" title="#double_words (instance method)">- (Object) <strong>double_words</strong> </a>
|
308
|
+
|
309
|
+
|
310
|
+
|
311
|
+
</span>
|
312
|
+
|
313
|
+
|
314
|
+
|
315
|
+
|
316
|
+
|
317
|
+
|
318
|
+
|
319
|
+
|
320
|
+
|
321
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
322
|
+
|
323
|
+
</li>
|
324
|
+
|
325
|
+
|
326
|
+
<li class="public ">
|
327
|
+
<span class="summary_signature">
|
328
|
+
|
329
|
+
<a href="#ending_with-instance_method" title="#ending_with (instance method)">- (Object) <strong>ending_with</strong>(*letters) </a>
|
330
|
+
|
331
|
+
|
332
|
+
|
333
|
+
</span>
|
334
|
+
|
335
|
+
|
336
|
+
|
337
|
+
|
338
|
+
|
339
|
+
|
340
|
+
|
341
|
+
|
342
|
+
|
343
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
344
|
+
|
345
|
+
</li>
|
346
|
+
|
347
|
+
|
348
|
+
<li class="public ">
|
349
|
+
<span class="summary_signature">
|
350
|
+
|
351
|
+
<a href="#ending_with_letter-instance_method" title="#ending_with_letter (instance method)">- (Object) <strong>ending_with_letter</strong>(letr) </a>
|
352
|
+
|
353
|
+
|
354
|
+
|
355
|
+
</span>
|
356
|
+
|
357
|
+
|
358
|
+
|
359
|
+
|
360
|
+
|
361
|
+
|
362
|
+
|
363
|
+
|
364
|
+
|
365
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
366
|
+
|
367
|
+
</li>
|
368
|
+
|
369
|
+
|
370
|
+
<li class="public ">
|
371
|
+
<span class="summary_signature">
|
372
|
+
|
373
|
+
<a href="#exist%3F-instance_method" title="#exist? (instance method)">- (Boolean) <strong>exist?</strong> </a>
|
374
|
+
|
375
|
+
|
376
|
+
|
377
|
+
</span>
|
378
|
+
|
379
|
+
|
380
|
+
|
381
|
+
|
382
|
+
|
383
|
+
|
384
|
+
|
385
|
+
|
386
|
+
|
387
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
388
|
+
|
389
|
+
</li>
|
390
|
+
|
391
|
+
|
392
|
+
<li class="public ">
|
393
|
+
<span class="summary_signature">
|
394
|
+
|
395
|
+
<a href="#including-instance_method" title="#including (instance method)">- (Object) <strong>including</strong>(*letters) </a>
|
396
|
+
|
397
|
+
|
398
|
+
|
399
|
+
</span>
|
400
|
+
|
401
|
+
|
402
|
+
|
403
|
+
|
404
|
+
|
405
|
+
|
406
|
+
|
407
|
+
|
408
|
+
|
409
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
410
|
+
|
411
|
+
</li>
|
412
|
+
|
413
|
+
|
414
|
+
<li class="public ">
|
415
|
+
<span class="summary_signature">
|
416
|
+
|
417
|
+
<a href="#including_letter-instance_method" title="#including_letter (instance method)">- (Object) <strong>including_letter</strong>(letr) </a>
|
418
|
+
|
419
|
+
|
420
|
+
|
421
|
+
</span>
|
422
|
+
|
423
|
+
|
424
|
+
|
425
|
+
|
426
|
+
|
427
|
+
|
428
|
+
|
429
|
+
|
430
|
+
|
431
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
432
|
+
|
433
|
+
</li>
|
434
|
+
|
435
|
+
|
436
|
+
<li class="public ">
|
437
|
+
<span class="summary_signature">
|
438
|
+
|
439
|
+
<a href="#letter_group-instance_method" title="#letter_group (instance method)">- (Object) <strong>letter_group</strong> </a>
|
440
|
+
|
441
|
+
|
442
|
+
|
443
|
+
</span>
|
444
|
+
|
445
|
+
|
446
|
+
|
447
|
+
|
448
|
+
|
449
|
+
|
450
|
+
|
451
|
+
|
452
|
+
|
453
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
454
|
+
|
455
|
+
</li>
|
456
|
+
|
457
|
+
|
458
|
+
<li class="public ">
|
459
|
+
<span class="summary_signature">
|
460
|
+
|
461
|
+
<a href="#letters_numbers-instance_method" title="#letters_numbers (instance method)">- (Object) <strong>letters_numbers</strong> </a>
|
462
|
+
|
463
|
+
|
464
|
+
|
465
|
+
</span>
|
466
|
+
|
467
|
+
|
468
|
+
|
469
|
+
|
470
|
+
|
471
|
+
|
472
|
+
|
473
|
+
|
474
|
+
|
475
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
476
|
+
|
477
|
+
</li>
|
478
|
+
|
479
|
+
|
480
|
+
<li class="public ">
|
481
|
+
<span class="summary_signature">
|
482
|
+
|
483
|
+
<a href="#load-instance_method" title="#load (instance method)">- (Object) <strong>load</strong>(filename) </a>
|
484
|
+
|
485
|
+
|
486
|
+
|
487
|
+
</span>
|
488
|
+
|
489
|
+
|
490
|
+
|
491
|
+
|
492
|
+
|
493
|
+
|
494
|
+
|
495
|
+
|
496
|
+
|
497
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
498
|
+
|
499
|
+
</li>
|
500
|
+
|
501
|
+
|
502
|
+
<li class="public ">
|
503
|
+
<span class="summary_signature">
|
504
|
+
|
505
|
+
<a href="#no_longer_than-instance_method" title="#no_longer_than (instance method)">- (Object) <strong>no_longer_than</strong>(max) </a>
|
506
|
+
|
507
|
+
|
508
|
+
|
509
|
+
</span>
|
510
|
+
|
511
|
+
|
512
|
+
|
513
|
+
|
514
|
+
|
515
|
+
|
516
|
+
|
517
|
+
|
518
|
+
|
519
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
520
|
+
|
521
|
+
</li>
|
522
|
+
|
523
|
+
|
524
|
+
<li class="public ">
|
525
|
+
<span class="summary_signature">
|
526
|
+
|
527
|
+
<a href="#no_shorter_than-instance_method" title="#no_shorter_than (instance method)">- (Object) <strong>no_shorter_than</strong>(min) </a>
|
528
|
+
|
529
|
+
|
530
|
+
|
531
|
+
</span>
|
532
|
+
|
533
|
+
|
534
|
+
|
535
|
+
|
536
|
+
|
537
|
+
|
538
|
+
|
539
|
+
|
540
|
+
|
541
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
542
|
+
|
543
|
+
</li>
|
544
|
+
|
545
|
+
|
546
|
+
<li class="public ">
|
547
|
+
<span class="summary_signature">
|
548
|
+
|
549
|
+
<a href="#number_group-instance_method" title="#number_group (instance method)">- (Object) <strong>number_group</strong> </a>
|
550
|
+
|
551
|
+
|
552
|
+
|
553
|
+
</span>
|
554
|
+
|
555
|
+
|
556
|
+
|
557
|
+
|
558
|
+
|
559
|
+
|
560
|
+
|
561
|
+
|
562
|
+
|
563
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
564
|
+
|
565
|
+
</li>
|
566
|
+
|
567
|
+
|
568
|
+
<li class="public ">
|
569
|
+
<span class="summary_signature">
|
570
|
+
|
571
|
+
<a href="#numbers-instance_method" title="#numbers (instance method)">- (Object) <strong>numbers</strong>(options = {reverse: nil}) </a>
|
572
|
+
|
573
|
+
|
574
|
+
|
575
|
+
</span>
|
576
|
+
|
577
|
+
|
578
|
+
|
579
|
+
|
580
|
+
|
581
|
+
|
582
|
+
|
583
|
+
|
584
|
+
|
585
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
586
|
+
|
587
|
+
</li>
|
588
|
+
|
589
|
+
|
590
|
+
<li class="public ">
|
591
|
+
<span class="summary_signature">
|
592
|
+
|
593
|
+
<a href="#numbers_spoken-instance_method" title="#numbers_spoken (instance method)">- (Object) <strong>numbers_spoken</strong> </a>
|
594
|
+
|
595
|
+
|
596
|
+
|
597
|
+
</span>
|
598
|
+
|
599
|
+
|
600
|
+
|
601
|
+
|
602
|
+
|
603
|
+
|
604
|
+
|
605
|
+
|
606
|
+
|
607
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
608
|
+
|
609
|
+
</li>
|
610
|
+
|
611
|
+
|
612
|
+
<li class="public ">
|
613
|
+
<span class="summary_signature">
|
614
|
+
|
615
|
+
<a href="#random_letters-instance_method" title="#random_letters (instance method)">- (Object) <strong>random_letters</strong>(options = {}) </a>
|
616
|
+
|
617
|
+
|
618
|
+
|
619
|
+
</span>
|
620
|
+
|
621
|
+
|
622
|
+
|
623
|
+
|
624
|
+
|
625
|
+
|
626
|
+
|
627
|
+
|
628
|
+
|
629
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
630
|
+
|
631
|
+
</li>
|
632
|
+
|
633
|
+
|
634
|
+
<li class="public ">
|
635
|
+
<span class="summary_signature">
|
636
|
+
|
637
|
+
<a href="#random_letters_numbers-instance_method" title="#random_letters_numbers (instance method)">- (Object) <strong>random_letters_numbers</strong>(options = {}) </a>
|
638
|
+
|
639
|
+
|
640
|
+
|
641
|
+
</span>
|
642
|
+
|
643
|
+
|
644
|
+
|
645
|
+
|
646
|
+
|
647
|
+
|
648
|
+
|
649
|
+
|
650
|
+
|
651
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
652
|
+
|
653
|
+
</li>
|
654
|
+
|
655
|
+
|
656
|
+
<li class="public ">
|
657
|
+
<span class="summary_signature">
|
658
|
+
|
659
|
+
<a href="#random_numbers-instance_method" title="#random_numbers (instance method)">- (Object) <strong>random_numbers</strong>(options = {}) </a>
|
660
|
+
|
661
|
+
|
662
|
+
|
663
|
+
</span>
|
664
|
+
|
665
|
+
|
666
|
+
|
667
|
+
|
668
|
+
|
669
|
+
|
670
|
+
|
671
|
+
|
672
|
+
|
673
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
674
|
+
|
675
|
+
</li>
|
676
|
+
|
677
|
+
|
678
|
+
<li class="public ">
|
679
|
+
<span class="summary_signature">
|
680
|
+
|
681
|
+
<a href="#reverse-instance_method" title="#reverse (instance method)">- (Object) <strong>reverse</strong> </a>
|
682
|
+
|
683
|
+
|
684
|
+
|
685
|
+
</span>
|
686
|
+
|
687
|
+
|
688
|
+
|
689
|
+
|
690
|
+
|
691
|
+
|
692
|
+
|
693
|
+
|
694
|
+
|
695
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
696
|
+
|
697
|
+
</li>
|
698
|
+
|
699
|
+
|
700
|
+
<li class="public ">
|
701
|
+
<span class="summary_signature">
|
702
|
+
|
703
|
+
<a href="#shuffle-instance_method" title="#shuffle (instance method)">- (Object) <strong>shuffle</strong> </a>
|
704
|
+
|
705
|
+
|
706
|
+
|
707
|
+
</span>
|
708
|
+
|
709
|
+
|
710
|
+
|
711
|
+
|
712
|
+
|
713
|
+
|
714
|
+
|
715
|
+
|
716
|
+
|
717
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
718
|
+
|
719
|
+
</li>
|
720
|
+
|
721
|
+
|
722
|
+
<li class="public ">
|
723
|
+
<span class="summary_signature">
|
724
|
+
|
725
|
+
<a href="#to_array-instance_method" title="#to_array (instance method)">- (Object) <strong>to_array</strong> </a>
|
726
|
+
|
727
|
+
|
728
|
+
|
729
|
+
</span>
|
730
|
+
|
731
|
+
|
732
|
+
|
733
|
+
|
734
|
+
|
735
|
+
|
736
|
+
|
737
|
+
|
738
|
+
|
739
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
740
|
+
|
741
|
+
</li>
|
742
|
+
|
743
|
+
|
744
|
+
<li class="public ">
|
745
|
+
<span class="summary_signature">
|
746
|
+
|
747
|
+
<a href="#to_s-instance_method" title="#to_s (instance method)">- (Object) <strong>to_s</strong> </a>
|
748
|
+
|
749
|
+
|
750
|
+
|
751
|
+
</span>
|
752
|
+
|
753
|
+
|
754
|
+
|
755
|
+
|
756
|
+
|
757
|
+
|
758
|
+
|
759
|
+
|
760
|
+
|
761
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
762
|
+
|
763
|
+
</li>
|
764
|
+
|
765
|
+
|
766
|
+
<li class="public ">
|
767
|
+
<span class="summary_signature">
|
768
|
+
|
769
|
+
<a href="#word_size-instance_method" title="#word_size (instance method)">- (Object) <strong>word_size</strong>(size) </a>
|
770
|
+
|
771
|
+
|
772
|
+
|
773
|
+
</span>
|
774
|
+
|
775
|
+
|
776
|
+
|
777
|
+
|
778
|
+
|
779
|
+
|
780
|
+
|
781
|
+
|
782
|
+
|
783
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
784
|
+
|
785
|
+
</li>
|
786
|
+
|
787
|
+
|
788
|
+
</ul>
|
789
|
+
|
790
|
+
|
791
|
+
|
792
|
+
|
793
|
+
<div id="instance_method_details" class="method_details_list">
|
794
|
+
<h2>Instance Method Details</h2>
|
795
|
+
|
796
|
+
|
797
|
+
<div class="method_details first">
|
798
|
+
<h3 class="signature first" id="add-instance_method">
|
799
|
+
|
800
|
+
- (<tt>Object</tt>) <strong>add</strong>(words)
|
801
|
+
|
802
|
+
|
803
|
+
|
804
|
+
|
805
|
+
|
806
|
+
</h3><table class="source_code">
|
807
|
+
<tr>
|
808
|
+
<td>
|
809
|
+
<pre class="lines">
|
810
|
+
|
811
|
+
|
812
|
+
84
|
813
|
+
85
|
814
|
+
86</pre>
|
815
|
+
</td>
|
816
|
+
<td>
|
817
|
+
<pre class="code"><span class="info file"># File 'lib/cw/words.rb', line 84</span>
|
818
|
+
|
819
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_add'>add</span> <span class='id identifier rubyid_words'>words</span>
|
820
|
+
<span class='ivar'>@words</span> <span class='op'>=</span> <span class='id identifier rubyid_words'>words</span>
|
821
|
+
<span class='kw'>end</span></pre>
|
822
|
+
</td>
|
823
|
+
</tr>
|
824
|
+
</table>
|
825
|
+
</div>
|
826
|
+
|
827
|
+
<div class="method_details ">
|
828
|
+
<h3 class="signature " id="all-instance_method">
|
829
|
+
|
830
|
+
- (<tt>Object</tt>) <strong>all</strong>
|
831
|
+
|
832
|
+
|
833
|
+
|
834
|
+
|
835
|
+
|
836
|
+
</h3><table class="source_code">
|
837
|
+
<tr>
|
838
|
+
<td>
|
839
|
+
<pre class="lines">
|
840
|
+
|
841
|
+
|
842
|
+
76
|
843
|
+
77
|
844
|
+
78</pre>
|
845
|
+
</td>
|
846
|
+
<td>
|
847
|
+
<pre class="code"><span class="info file"># File 'lib/cw/words.rb', line 76</span>
|
848
|
+
|
849
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_all'>all</span>
|
850
|
+
<span class='ivar'>@words</span>
|
851
|
+
<span class='kw'>end</span></pre>
|
852
|
+
</td>
|
853
|
+
</tr>
|
854
|
+
</table>
|
855
|
+
</div>
|
856
|
+
|
857
|
+
<div class="method_details ">
|
858
|
+
<h3 class="signature " id="alphabet-instance_method">
|
859
|
+
|
860
|
+
- (<tt>Object</tt>) <strong>alphabet</strong>(options = {reverse: nil})
|
861
|
+
|
862
|
+
|
863
|
+
|
864
|
+
|
865
|
+
|
866
|
+
</h3><table class="source_code">
|
867
|
+
<tr>
|
868
|
+
<td>
|
869
|
+
<pre class="lines">
|
870
|
+
|
871
|
+
|
872
|
+
171
|
873
|
+
172
|
874
|
+
173</pre>
|
875
|
+
</td>
|
876
|
+
<td>
|
877
|
+
<pre class="code"><span class="info file"># File 'lib/cw/words.rb', line 171</span>
|
878
|
+
|
879
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_alphabet'>alphabet</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='label'>reverse:</span> <span class='kw'>nil</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
880
|
+
<span class='ivar'>@words</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='const'>Alphabet</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_generate'>generate</span><span class='rbracket'>]</span>
|
881
|
+
<span class='kw'>end</span></pre>
|
882
|
+
</td>
|
883
|
+
</tr>
|
884
|
+
</table>
|
885
|
+
</div>
|
886
|
+
|
887
|
+
<div class="method_details ">
|
888
|
+
<h3 class="signature " id="assign-instance_method">
|
889
|
+
|
890
|
+
- (<tt>Object</tt>) <strong>assign</strong>(words)
|
891
|
+
|
892
|
+
|
893
|
+
|
894
|
+
|
895
|
+
|
896
|
+
</h3><table class="source_code">
|
897
|
+
<tr>
|
898
|
+
<td>
|
899
|
+
<pre class="lines">
|
900
|
+
|
901
|
+
|
902
|
+
132
|
903
|
+
133
|
904
|
+
134
|
905
|
+
135
|
906
|
+
136</pre>
|
907
|
+
</td>
|
908
|
+
<td>
|
909
|
+
<pre class="code"><span class="info file"># File 'lib/cw/words.rb', line 132</span>
|
910
|
+
|
911
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_assign'>assign</span><span class='lparen'>(</span><span class='id identifier rubyid_words'>words</span><span class='rparen'>)</span>
|
912
|
+
<span class='id identifier rubyid_words'>words</span><span class='period'>.</span><span class='id identifier rubyid_kind_of?'>kind_of?</span><span class='lparen'>(</span><span class='const'>String</span><span class='rparen'>)</span> <span class='op'>?</span>
|
913
|
+
<span class='ivar'>@words</span> <span class='op'>=</span> <span class='id identifier rubyid_words'>words</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>\s+</span><span class='regexp_end'>/</span></span><span class='rparen'>)</span> <span class='op'>:</span>
|
914
|
+
<span class='ivar'>@words</span> <span class='op'>=</span> <span class='id identifier rubyid_words'>words</span>
|
915
|
+
<span class='kw'>end</span></pre>
|
916
|
+
</td>
|
917
|
+
</tr>
|
918
|
+
</table>
|
919
|
+
</div>
|
920
|
+
|
921
|
+
<div class="method_details ">
|
922
|
+
<h3 class="signature " id="beginning_with-instance_method">
|
923
|
+
|
924
|
+
- (<tt>Object</tt>) <strong>beginning_with</strong>(*letters)
|
925
|
+
|
926
|
+
|
927
|
+
|
928
|
+
|
929
|
+
|
930
|
+
</h3><table class="source_code">
|
931
|
+
<tr>
|
932
|
+
<td>
|
933
|
+
<pre class="lines">
|
934
|
+
|
935
|
+
|
936
|
+
100
|
937
|
+
101
|
938
|
+
102</pre>
|
939
|
+
</td>
|
940
|
+
<td>
|
941
|
+
<pre class="code"><span class="info file"># File 'lib/cw/words.rb', line 100</span>
|
942
|
+
|
943
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_beginning_with'>beginning_with</span><span class='lparen'>(</span><span class='op'>*</span> <span class='id identifier rubyid_letters'>letters</span><span class='rparen'>)</span>
|
944
|
+
<span class='ivar'>@words</span> <span class='op'>=</span> <span class='id identifier rubyid_letters'>letters</span><span class='period'>.</span><span class='id identifier rubyid_flatten'>flatten</span><span class='period'>.</span><span class='id identifier rubyid_collect'>collect</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_letr'>letr</span><span class='op'>|</span> <span class='id identifier rubyid_beginning_with_letter'>beginning_with_letter</span><span class='lparen'>(</span><span class='id identifier rubyid_letr'>letr</span><span class='rparen'>)</span><span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_flatten'>flatten</span>
|
945
|
+
<span class='kw'>end</span></pre>
|
946
|
+
</td>
|
947
|
+
</tr>
|
948
|
+
</table>
|
949
|
+
</div>
|
950
|
+
|
951
|
+
<div class="method_details ">
|
952
|
+
<h3 class="signature " id="beginning_with_letter-instance_method">
|
953
|
+
|
954
|
+
- (<tt>Object</tt>) <strong>beginning_with_letter</strong>(letr)
|
955
|
+
|
956
|
+
|
957
|
+
|
958
|
+
|
959
|
+
|
960
|
+
</h3><table class="source_code">
|
961
|
+
<tr>
|
962
|
+
<td>
|
963
|
+
<pre class="lines">
|
964
|
+
|
965
|
+
|
966
|
+
96
|
967
|
+
97
|
968
|
+
98</pre>
|
969
|
+
</td>
|
970
|
+
<td>
|
971
|
+
<pre class="code"><span class="info file"># File 'lib/cw/words.rb', line 96</span>
|
972
|
+
|
973
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_beginning_with_letter'>beginning_with_letter</span><span class='lparen'>(</span><span class='id identifier rubyid_letr'>letr</span><span class='rparen'>)</span>
|
974
|
+
<span class='ivar'>@words</span><span class='period'>.</span><span class='id identifier rubyid_select'>select</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_wrd'>wrd</span><span class='op'>|</span> <span class='id identifier rubyid_wrd'>wrd</span><span class='period'>.</span><span class='id identifier rubyid_start_with?'>start_with?</span><span class='lparen'>(</span><span class='id identifier rubyid_letr'>letr</span><span class='rparen'>)</span><span class='rbrace'>}</span>
|
975
|
+
<span class='kw'>end</span></pre>
|
976
|
+
</td>
|
977
|
+
</tr>
|
978
|
+
</table>
|
979
|
+
</div>
|
980
|
+
|
981
|
+
<div class="method_details ">
|
982
|
+
<h3 class="signature " id="collect_words-instance_method">
|
983
|
+
|
984
|
+
- (<tt>Object</tt>) <strong>collect_words</strong>
|
985
|
+
|
986
|
+
|
987
|
+
|
988
|
+
|
989
|
+
|
990
|
+
</h3><table class="source_code">
|
991
|
+
<tr>
|
992
|
+
<td>
|
993
|
+
<pre class="lines">
|
994
|
+
|
995
|
+
|
996
|
+
138
|
997
|
+
139
|
998
|
+
140
|
999
|
+
141</pre>
|
1000
|
+
</td>
|
1001
|
+
<td>
|
1002
|
+
<pre class="code"><span class="info file"># File 'lib/cw/words.rb', line 138</span>
|
1003
|
+
|
1004
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_collect_words'>collect_words</span>
|
1005
|
+
<span class='ivar'>@words</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span><span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_word'>word</span><span class='op'>|</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'> </span><span class='tstring_end'>'</span></span> <span class='op'>+</span> <span class='id identifier rubyid_word'>word</span> <span class='rbrace'>}</span><span class='period'>.</span>
|
1006
|
+
<span class='id identifier rubyid_collect'>collect</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_wrd'>wrd</span><span class='op'>|</span> <span class='id identifier rubyid_wrd'>wrd</span><span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'> </span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
1007
|
+
<span class='kw'>end</span></pre>
|
1008
|
+
</td>
|
1009
|
+
</tr>
|
1010
|
+
</table>
|
1011
|
+
</div>
|
1012
|
+
|
1013
|
+
<div class="method_details ">
|
1014
|
+
<h3 class="signature " id="count-instance_method">
|
1015
|
+
|
1016
|
+
- (<tt>Object</tt>) <strong>count</strong>(word_count)
|
1017
|
+
|
1018
|
+
|
1019
|
+
|
1020
|
+
|
1021
|
+
|
1022
|
+
</h3><table class="source_code">
|
1023
|
+
<tr>
|
1024
|
+
<td>
|
1025
|
+
<pre class="lines">
|
1026
|
+
|
1027
|
+
|
1028
|
+
112
|
1029
|
+
113
|
1030
|
+
114</pre>
|
1031
|
+
</td>
|
1032
|
+
<td>
|
1033
|
+
<pre class="code"><span class="info file"># File 'lib/cw/words.rb', line 112</span>
|
1034
|
+
|
1035
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_count'>count</span> <span class='id identifier rubyid_word_count'>word_count</span>
|
1036
|
+
<span class='ivar'>@words</span> <span class='op'>=</span> <span class='ivar'>@words</span><span class='period'>.</span><span class='id identifier rubyid_take'>take</span><span class='lparen'>(</span><span class='id identifier rubyid_word_count'>word_count</span><span class='rparen'>)</span>
|
1037
|
+
<span class='kw'>end</span></pre>
|
1038
|
+
</td>
|
1039
|
+
</tr>
|
1040
|
+
</table>
|
1041
|
+
</div>
|
1042
|
+
|
1043
|
+
<div class="method_details ">
|
1044
|
+
<h3 class="signature " id="double_words-instance_method">
|
1045
|
+
|
1046
|
+
- (<tt>Object</tt>) <strong>double_words</strong>
|
1047
|
+
|
1048
|
+
|
1049
|
+
|
1050
|
+
|
1051
|
+
|
1052
|
+
</h3><table class="source_code">
|
1053
|
+
<tr>
|
1054
|
+
<td>
|
1055
|
+
<pre class="lines">
|
1056
|
+
|
1057
|
+
|
1058
|
+
59
|
1059
|
+
60
|
1060
|
+
61
|
1061
|
+
62
|
1062
|
+
63
|
1063
|
+
64
|
1064
|
+
65
|
1065
|
+
66</pre>
|
1066
|
+
</td>
|
1067
|
+
<td>
|
1068
|
+
<pre class="code"><span class="info file"># File 'lib/cw/words.rb', line 59</span>
|
1069
|
+
|
1070
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_double_words'>double_words</span>
|
1071
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>here</span><span class='tstring_end'>'</span></span>
|
1072
|
+
<span class='id identifier rubyid_temp'>temp</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
1073
|
+
<span class='ivar'>@words</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_wrd'>wrd</span><span class='op'>|</span>
|
1074
|
+
<span class='int'>2</span><span class='period'>.</span><span class='id identifier rubyid_times'>times</span> <span class='lbrace'>{</span> <span class='id identifier rubyid_temp'>temp</span><span class='period'>.</span><span class='id identifier rubyid_push'>push</span> <span class='id identifier rubyid_wrd'>wrd</span> <span class='rbrace'>}</span>
|
1075
|
+
<span class='kw'>end</span>
|
1076
|
+
<span class='ivar'>@words</span> <span class='op'>=</span> <span class='id identifier rubyid_temp'>temp</span>
|
1077
|
+
<span class='kw'>end</span></pre>
|
1078
|
+
</td>
|
1079
|
+
</tr>
|
1080
|
+
</table>
|
1081
|
+
</div>
|
1082
|
+
|
1083
|
+
<div class="method_details ">
|
1084
|
+
<h3 class="signature " id="ending_with-instance_method">
|
1085
|
+
|
1086
|
+
- (<tt>Object</tt>) <strong>ending_with</strong>(*letters)
|
1087
|
+
|
1088
|
+
|
1089
|
+
|
1090
|
+
|
1091
|
+
|
1092
|
+
</h3><table class="source_code">
|
1093
|
+
<tr>
|
1094
|
+
<td>
|
1095
|
+
<pre class="lines">
|
1096
|
+
|
1097
|
+
|
1098
|
+
108
|
1099
|
+
109
|
1100
|
+
110</pre>
|
1101
|
+
</td>
|
1102
|
+
<td>
|
1103
|
+
<pre class="code"><span class="info file"># File 'lib/cw/words.rb', line 108</span>
|
1104
|
+
|
1105
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_ending_with'>ending_with</span><span class='lparen'>(</span><span class='op'>*</span> <span class='id identifier rubyid_letters'>letters</span><span class='rparen'>)</span>
|
1106
|
+
<span class='ivar'>@words</span> <span class='op'>=</span> <span class='id identifier rubyid_letters'>letters</span><span class='period'>.</span><span class='id identifier rubyid_flatten'>flatten</span><span class='period'>.</span><span class='id identifier rubyid_collect'>collect</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_letr'>letr</span><span class='op'>|</span> <span class='id identifier rubyid_ending_with_letter'>ending_with_letter</span><span class='lparen'>(</span><span class='id identifier rubyid_letr'>letr</span><span class='rparen'>)</span><span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_flatten'>flatten</span>
|
1107
|
+
<span class='kw'>end</span></pre>
|
1108
|
+
</td>
|
1109
|
+
</tr>
|
1110
|
+
</table>
|
1111
|
+
</div>
|
1112
|
+
|
1113
|
+
<div class="method_details ">
|
1114
|
+
<h3 class="signature " id="ending_with_letter-instance_method">
|
1115
|
+
|
1116
|
+
- (<tt>Object</tt>) <strong>ending_with_letter</strong>(letr)
|
1117
|
+
|
1118
|
+
|
1119
|
+
|
1120
|
+
|
1121
|
+
|
1122
|
+
</h3><table class="source_code">
|
1123
|
+
<tr>
|
1124
|
+
<td>
|
1125
|
+
<pre class="lines">
|
1126
|
+
|
1127
|
+
|
1128
|
+
104
|
1129
|
+
105
|
1130
|
+
106</pre>
|
1131
|
+
</td>
|
1132
|
+
<td>
|
1133
|
+
<pre class="code"><span class="info file"># File 'lib/cw/words.rb', line 104</span>
|
1134
|
+
|
1135
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_ending_with_letter'>ending_with_letter</span><span class='lparen'>(</span><span class='id identifier rubyid_letr'>letr</span><span class='rparen'>)</span>
|
1136
|
+
<span class='ivar'>@words</span><span class='period'>.</span><span class='id identifier rubyid_select'>select</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_wrd'>wrd</span><span class='op'>|</span> <span class='id identifier rubyid_wrd'>wrd</span><span class='period'>.</span><span class='id identifier rubyid_end_with?'>end_with?</span><span class='lparen'>(</span><span class='id identifier rubyid_letr'>letr</span><span class='rparen'>)</span><span class='rbrace'>}</span>
|
1137
|
+
<span class='kw'>end</span></pre>
|
1138
|
+
</td>
|
1139
|
+
</tr>
|
1140
|
+
</table>
|
1141
|
+
</div>
|
1142
|
+
|
1143
|
+
<div class="method_details ">
|
1144
|
+
<h3 class="signature " id="exist?-instance_method">
|
1145
|
+
|
1146
|
+
- (<tt>Boolean</tt>) <strong>exist?</strong>
|
1147
|
+
|
1148
|
+
|
1149
|
+
|
1150
|
+
|
1151
|
+
|
1152
|
+
</h3><div class="docstring">
|
1153
|
+
<div class="discussion">
|
1154
|
+
|
1155
|
+
|
1156
|
+
</div>
|
1157
|
+
</div>
|
1158
|
+
<div class="tags">
|
1159
|
+
|
1160
|
+
<p class="tag_title">Returns:</p>
|
1161
|
+
<ul class="return">
|
1162
|
+
|
1163
|
+
<li>
|
1164
|
+
|
1165
|
+
|
1166
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
1167
|
+
|
1168
|
+
|
1169
|
+
|
1170
|
+
</li>
|
1171
|
+
|
1172
|
+
</ul>
|
1173
|
+
|
1174
|
+
</div><table class="source_code">
|
1175
|
+
<tr>
|
1176
|
+
<td>
|
1177
|
+
<pre class="lines">
|
1178
|
+
|
1179
|
+
|
1180
|
+
88
|
1181
|
+
89
|
1182
|
+
90</pre>
|
1183
|
+
</td>
|
1184
|
+
<td>
|
1185
|
+
<pre class="code"><span class="info file"># File 'lib/cw/words.rb', line 88</span>
|
1186
|
+
|
1187
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_exist?'>exist?</span>
|
1188
|
+
<span class='ivar'>@words</span>
|
1189
|
+
<span class='kw'>end</span></pre>
|
1190
|
+
</td>
|
1191
|
+
</tr>
|
1192
|
+
</table>
|
1193
|
+
</div>
|
1194
|
+
|
1195
|
+
<div class="method_details ">
|
1196
|
+
<h3 class="signature " id="including-instance_method">
|
1197
|
+
|
1198
|
+
- (<tt>Object</tt>) <strong>including</strong>(*letters)
|
1199
|
+
|
1200
|
+
|
1201
|
+
|
1202
|
+
|
1203
|
+
|
1204
|
+
</h3><table class="source_code">
|
1205
|
+
<tr>
|
1206
|
+
<td>
|
1207
|
+
<pre class="lines">
|
1208
|
+
|
1209
|
+
|
1210
|
+
120
|
1211
|
+
121
|
1212
|
+
122</pre>
|
1213
|
+
</td>
|
1214
|
+
<td>
|
1215
|
+
<pre class="code"><span class="info file"># File 'lib/cw/words.rb', line 120</span>
|
1216
|
+
|
1217
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_including'>including</span><span class='lparen'>(</span><span class='op'>*</span> <span class='id identifier rubyid_letters'>letters</span><span class='rparen'>)</span>
|
1218
|
+
<span class='ivar'>@words</span> <span class='op'>=</span> <span class='id identifier rubyid_letters'>letters</span><span class='period'>.</span><span class='id identifier rubyid_flatten'>flatten</span><span class='period'>.</span><span class='id identifier rubyid_collect'>collect</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_letr'>letr</span><span class='op'>|</span> <span class='id identifier rubyid_including_letter'>including_letter</span><span class='lparen'>(</span><span class='id identifier rubyid_letr'>letr</span><span class='rparen'>)</span><span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_flatten'>flatten</span>
|
1219
|
+
<span class='kw'>end</span></pre>
|
1220
|
+
</td>
|
1221
|
+
</tr>
|
1222
|
+
</table>
|
1223
|
+
</div>
|
1224
|
+
|
1225
|
+
<div class="method_details ">
|
1226
|
+
<h3 class="signature " id="including_letter-instance_method">
|
1227
|
+
|
1228
|
+
- (<tt>Object</tt>) <strong>including_letter</strong>(letr)
|
1229
|
+
|
1230
|
+
|
1231
|
+
|
1232
|
+
|
1233
|
+
|
1234
|
+
</h3><table class="source_code">
|
1235
|
+
<tr>
|
1236
|
+
<td>
|
1237
|
+
<pre class="lines">
|
1238
|
+
|
1239
|
+
|
1240
|
+
116
|
1241
|
+
117
|
1242
|
+
118</pre>
|
1243
|
+
</td>
|
1244
|
+
<td>
|
1245
|
+
<pre class="code"><span class="info file"># File 'lib/cw/words.rb', line 116</span>
|
1246
|
+
|
1247
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_including_letter'>including_letter</span><span class='lparen'>(</span><span class='id identifier rubyid_letr'>letr</span><span class='rparen'>)</span>
|
1248
|
+
<span class='ivar'>@words</span><span class='period'>.</span><span class='id identifier rubyid_select'>select</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_wrd'>wrd</span><span class='op'>|</span> <span class='id identifier rubyid_wrd'>wrd</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='id identifier rubyid_letr'>letr</span><span class='rparen'>)</span><span class='rbrace'>}</span>
|
1249
|
+
<span class='kw'>end</span></pre>
|
1250
|
+
</td>
|
1251
|
+
</tr>
|
1252
|
+
</table>
|
1253
|
+
</div>
|
1254
|
+
|
1255
|
+
<div class="method_details ">
|
1256
|
+
<h3 class="signature " id="letter_group-instance_method">
|
1257
|
+
|
1258
|
+
- (<tt>Object</tt>) <strong>letter_group</strong>
|
1259
|
+
|
1260
|
+
|
1261
|
+
|
1262
|
+
|
1263
|
+
|
1264
|
+
</h3><table class="source_code">
|
1265
|
+
<tr>
|
1266
|
+
<td>
|
1267
|
+
<pre class="lines">
|
1268
|
+
|
1269
|
+
|
1270
|
+
147
|
1271
|
+
148
|
1272
|
+
149</pre>
|
1273
|
+
</td>
|
1274
|
+
<td>
|
1275
|
+
<pre class="code"><span class="info file"># File 'lib/cw/words.rb', line 147</span>
|
1276
|
+
|
1277
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_letter_group'>letter_group</span>
|
1278
|
+
<span class='lparen'>(</span><span class='int'>97</span><span class='op'>..</span><span class='int'>122</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_a'>to_a</span>
|
1279
|
+
<span class='kw'>end</span></pre>
|
1280
|
+
</td>
|
1281
|
+
</tr>
|
1282
|
+
</table>
|
1283
|
+
</div>
|
1284
|
+
|
1285
|
+
<div class="method_details ">
|
1286
|
+
<h3 class="signature " id="letters_numbers-instance_method">
|
1287
|
+
|
1288
|
+
- (<tt>Object</tt>) <strong>letters_numbers</strong>
|
1289
|
+
|
1290
|
+
|
1291
|
+
|
1292
|
+
|
1293
|
+
|
1294
|
+
</h3><table class="source_code">
|
1295
|
+
<tr>
|
1296
|
+
<td>
|
1297
|
+
<pre class="lines">
|
1298
|
+
|
1299
|
+
|
1300
|
+
155
|
1301
|
+
156
|
1302
|
+
157</pre>
|
1303
|
+
</td>
|
1304
|
+
<td>
|
1305
|
+
<pre class="code"><span class="info file"># File 'lib/cw/words.rb', line 155</span>
|
1306
|
+
|
1307
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_letters_numbers'>letters_numbers</span>
|
1308
|
+
<span class='id identifier rubyid_letter_group'>letter_group</span><span class='period'>.</span><span class='id identifier rubyid_push'>push</span><span class='lparen'>(</span> <span class='op'>*</span> <span class='id identifier rubyid_number_group'>number_group</span><span class='rparen'>)</span>
|
1309
|
+
<span class='kw'>end</span></pre>
|
1310
|
+
</td>
|
1311
|
+
</tr>
|
1312
|
+
</table>
|
1313
|
+
</div>
|
1314
|
+
|
1315
|
+
<div class="method_details ">
|
1316
|
+
<h3 class="signature " id="load-instance_method">
|
1317
|
+
|
1318
|
+
- (<tt>Object</tt>) <strong>load</strong>(filename)
|
1319
|
+
|
1320
|
+
|
1321
|
+
|
1322
|
+
|
1323
|
+
|
1324
|
+
</h3><table class="source_code">
|
1325
|
+
<tr>
|
1326
|
+
<td>
|
1327
|
+
<pre class="lines">
|
1328
|
+
|
1329
|
+
|
1330
|
+
53
|
1331
|
+
54
|
1332
|
+
55
|
1333
|
+
56
|
1334
|
+
57</pre>
|
1335
|
+
</td>
|
1336
|
+
<td>
|
1337
|
+
<pre class="code"><span class="info file"># File 'lib/cw/words.rb', line 53</span>
|
1338
|
+
|
1339
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_load'>load</span><span class='lparen'>(</span><span class='id identifier rubyid_filename'>filename</span><span class='rparen'>)</span>
|
1340
|
+
<span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_open'>open</span><span class='lparen'>(</span><span class='id identifier rubyid_filename'>filename</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>r</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_file'>file</span><span class='op'>|</span>
|
1341
|
+
<span class='ivar'>@words</span> <span class='op'>=</span> <span class='id identifier rubyid_file'>file</span><span class='period'>.</span><span class='id identifier rubyid_read'>read</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span>
|
1342
|
+
<span class='kw'>end</span>
|
1343
|
+
<span class='kw'>end</span></pre>
|
1344
|
+
</td>
|
1345
|
+
</tr>
|
1346
|
+
</table>
|
1347
|
+
</div>
|
1348
|
+
|
1349
|
+
<div class="method_details ">
|
1350
|
+
<h3 class="signature " id="no_longer_than-instance_method">
|
1351
|
+
|
1352
|
+
- (<tt>Object</tt>) <strong>no_longer_than</strong>(max)
|
1353
|
+
|
1354
|
+
|
1355
|
+
|
1356
|
+
|
1357
|
+
|
1358
|
+
</h3><table class="source_code">
|
1359
|
+
<tr>
|
1360
|
+
<td>
|
1361
|
+
<pre class="lines">
|
1362
|
+
|
1363
|
+
|
1364
|
+
124
|
1365
|
+
125
|
1366
|
+
126</pre>
|
1367
|
+
</td>
|
1368
|
+
<td>
|
1369
|
+
<pre class="code"><span class="info file"># File 'lib/cw/words.rb', line 124</span>
|
1370
|
+
|
1371
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_no_longer_than'>no_longer_than</span><span class='lparen'>(</span><span class='id identifier rubyid_max'>max</span><span class='rparen'>)</span>
|
1372
|
+
<span class='ivar'>@words</span> <span class='op'>=</span> <span class='ivar'>@words</span><span class='period'>.</span><span class='id identifier rubyid_select'>select</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_wrd'>wrd</span><span class='op'>|</span> <span class='id identifier rubyid_wrd'>wrd</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='op'><=</span> <span class='id identifier rubyid_max'>max</span><span class='rbrace'>}</span>
|
1373
|
+
<span class='kw'>end</span></pre>
|
1374
|
+
</td>
|
1375
|
+
</tr>
|
1376
|
+
</table>
|
1377
|
+
</div>
|
1378
|
+
|
1379
|
+
<div class="method_details ">
|
1380
|
+
<h3 class="signature " id="no_shorter_than-instance_method">
|
1381
|
+
|
1382
|
+
- (<tt>Object</tt>) <strong>no_shorter_than</strong>(min)
|
1383
|
+
|
1384
|
+
|
1385
|
+
|
1386
|
+
|
1387
|
+
|
1388
|
+
</h3><table class="source_code">
|
1389
|
+
<tr>
|
1390
|
+
<td>
|
1391
|
+
<pre class="lines">
|
1392
|
+
|
1393
|
+
|
1394
|
+
128
|
1395
|
+
129
|
1396
|
+
130</pre>
|
1397
|
+
</td>
|
1398
|
+
<td>
|
1399
|
+
<pre class="code"><span class="info file"># File 'lib/cw/words.rb', line 128</span>
|
1400
|
+
|
1401
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_no_shorter_than'>no_shorter_than</span><span class='lparen'>(</span><span class='id identifier rubyid_min'>min</span><span class='rparen'>)</span>
|
1402
|
+
<span class='ivar'>@words</span> <span class='op'>=</span> <span class='ivar'>@words</span><span class='period'>.</span><span class='id identifier rubyid_select'>select</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_wrd'>wrd</span><span class='op'>|</span> <span class='id identifier rubyid_wrd'>wrd</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='op'>>=</span> <span class='id identifier rubyid_min'>min</span><span class='rbrace'>}</span>
|
1403
|
+
<span class='kw'>end</span></pre>
|
1404
|
+
</td>
|
1405
|
+
</tr>
|
1406
|
+
</table>
|
1407
|
+
</div>
|
1408
|
+
|
1409
|
+
<div class="method_details ">
|
1410
|
+
<h3 class="signature " id="number_group-instance_method">
|
1411
|
+
|
1412
|
+
- (<tt>Object</tt>) <strong>number_group</strong>
|
1413
|
+
|
1414
|
+
|
1415
|
+
|
1416
|
+
|
1417
|
+
|
1418
|
+
</h3><table class="source_code">
|
1419
|
+
<tr>
|
1420
|
+
<td>
|
1421
|
+
<pre class="lines">
|
1422
|
+
|
1423
|
+
|
1424
|
+
151
|
1425
|
+
152
|
1426
|
+
153</pre>
|
1427
|
+
</td>
|
1428
|
+
<td>
|
1429
|
+
<pre class="code"><span class="info file"># File 'lib/cw/words.rb', line 151</span>
|
1430
|
+
|
1431
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_number_group'>number_group</span>
|
1432
|
+
<span class='lparen'>(</span><span class='int'>48</span><span class='op'>..</span><span class='int'>57</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_a'>to_a</span>
|
1433
|
+
<span class='kw'>end</span></pre>
|
1434
|
+
</td>
|
1435
|
+
</tr>
|
1436
|
+
</table>
|
1437
|
+
</div>
|
1438
|
+
|
1439
|
+
<div class="method_details ">
|
1440
|
+
<h3 class="signature " id="numbers-instance_method">
|
1441
|
+
|
1442
|
+
- (<tt>Object</tt>) <strong>numbers</strong>(options = {reverse: nil})
|
1443
|
+
|
1444
|
+
|
1445
|
+
|
1446
|
+
|
1447
|
+
|
1448
|
+
</h3><table class="source_code">
|
1449
|
+
<tr>
|
1450
|
+
<td>
|
1451
|
+
<pre class="lines">
|
1452
|
+
|
1453
|
+
|
1454
|
+
175
|
1455
|
+
176
|
1456
|
+
177</pre>
|
1457
|
+
</td>
|
1458
|
+
<td>
|
1459
|
+
<pre class="code"><span class="info file"># File 'lib/cw/words.rb', line 175</span>
|
1460
|
+
|
1461
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_numbers'>numbers</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='label'>reverse:</span> <span class='kw'>nil</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
1462
|
+
<span class='ivar'>@words</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='const'>Numbers</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_generate'>generate</span><span class='rbracket'>]</span>
|
1463
|
+
<span class='kw'>end</span></pre>
|
1464
|
+
</td>
|
1465
|
+
</tr>
|
1466
|
+
</table>
|
1467
|
+
</div>
|
1468
|
+
|
1469
|
+
<div class="method_details ">
|
1470
|
+
<h3 class="signature " id="numbers_spoken-instance_method">
|
1471
|
+
|
1472
|
+
- (<tt>Object</tt>) <strong>numbers_spoken</strong>
|
1473
|
+
|
1474
|
+
|
1475
|
+
|
1476
|
+
|
1477
|
+
|
1478
|
+
</h3><table class="source_code">
|
1479
|
+
<tr>
|
1480
|
+
<td>
|
1481
|
+
<pre class="lines">
|
1482
|
+
|
1483
|
+
|
1484
|
+
179
|
1485
|
+
180
|
1486
|
+
181</pre>
|
1487
|
+
</td>
|
1488
|
+
<td>
|
1489
|
+
<pre class="code"><span class="info file"># File 'lib/cw/words.rb', line 179</span>
|
1490
|
+
|
1491
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_numbers_spoken'>numbers_spoken</span><span class='lparen'>(</span><span class='rparen'>)</span>
|
1492
|
+
|
1493
|
+
<span class='kw'>end</span></pre>
|
1494
|
+
</td>
|
1495
|
+
</tr>
|
1496
|
+
</table>
|
1497
|
+
</div>
|
1498
|
+
|
1499
|
+
<div class="method_details ">
|
1500
|
+
<h3 class="signature " id="random_letters-instance_method">
|
1501
|
+
|
1502
|
+
- (<tt>Object</tt>) <strong>random_letters</strong>(options = {})
|
1503
|
+
|
1504
|
+
|
1505
|
+
|
1506
|
+
|
1507
|
+
|
1508
|
+
</h3><table class="source_code">
|
1509
|
+
<tr>
|
1510
|
+
<td>
|
1511
|
+
<pre class="lines">
|
1512
|
+
|
1513
|
+
|
1514
|
+
159
|
1515
|
+
160
|
1516
|
+
161</pre>
|
1517
|
+
</td>
|
1518
|
+
<td>
|
1519
|
+
<pre class="code"><span class="info file"># File 'lib/cw/words.rb', line 159</span>
|
1520
|
+
|
1521
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_random_letters'>random_letters</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>
|
1522
|
+
<span class='ivar'>@words</span> <span class='op'>=</span> <span class='const'>Randomize</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='comma'>,</span> <span class='id identifier rubyid_letter_group'>letter_group</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_generate'>generate</span>
|
1523
|
+
<span class='kw'>end</span></pre>
|
1524
|
+
</td>
|
1525
|
+
</tr>
|
1526
|
+
</table>
|
1527
|
+
</div>
|
1528
|
+
|
1529
|
+
<div class="method_details ">
|
1530
|
+
<h3 class="signature " id="random_letters_numbers-instance_method">
|
1531
|
+
|
1532
|
+
- (<tt>Object</tt>) <strong>random_letters_numbers</strong>(options = {})
|
1533
|
+
|
1534
|
+
|
1535
|
+
|
1536
|
+
|
1537
|
+
|
1538
|
+
</h3><table class="source_code">
|
1539
|
+
<tr>
|
1540
|
+
<td>
|
1541
|
+
<pre class="lines">
|
1542
|
+
|
1543
|
+
|
1544
|
+
167
|
1545
|
+
168
|
1546
|
+
169</pre>
|
1547
|
+
</td>
|
1548
|
+
<td>
|
1549
|
+
<pre class="code"><span class="info file"># File 'lib/cw/words.rb', line 167</span>
|
1550
|
+
|
1551
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_random_letters_numbers'>random_letters_numbers</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>
|
1552
|
+
<span class='ivar'>@words</span> <span class='op'>=</span> <span class='const'>Randomize</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='comma'>,</span> <span class='id identifier rubyid_letters_numbers'>letters_numbers</span><span class='period'>.</span><span class='id identifier rubyid_shuffle'>shuffle</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_generate'>generate</span>
|
1553
|
+
<span class='kw'>end</span></pre>
|
1554
|
+
</td>
|
1555
|
+
</tr>
|
1556
|
+
</table>
|
1557
|
+
</div>
|
1558
|
+
|
1559
|
+
<div class="method_details ">
|
1560
|
+
<h3 class="signature " id="random_numbers-instance_method">
|
1561
|
+
|
1562
|
+
- (<tt>Object</tt>) <strong>random_numbers</strong>(options = {})
|
1563
|
+
|
1564
|
+
|
1565
|
+
|
1566
|
+
|
1567
|
+
|
1568
|
+
</h3><table class="source_code">
|
1569
|
+
<tr>
|
1570
|
+
<td>
|
1571
|
+
<pre class="lines">
|
1572
|
+
|
1573
|
+
|
1574
|
+
163
|
1575
|
+
164
|
1576
|
+
165</pre>
|
1577
|
+
</td>
|
1578
|
+
<td>
|
1579
|
+
<pre class="code"><span class="info file"># File 'lib/cw/words.rb', line 163</span>
|
1580
|
+
|
1581
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_random_numbers'>random_numbers</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>
|
1582
|
+
<span class='ivar'>@words</span> <span class='op'>=</span> <span class='const'>Randomize</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='comma'>,</span> <span class='id identifier rubyid_number_group'>number_group</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_generate'>generate</span>
|
1583
|
+
<span class='kw'>end</span></pre>
|
1584
|
+
</td>
|
1585
|
+
</tr>
|
1586
|
+
</table>
|
1587
|
+
</div>
|
1588
|
+
|
1589
|
+
<div class="method_details ">
|
1590
|
+
<h3 class="signature " id="reverse-instance_method">
|
1591
|
+
|
1592
|
+
- (<tt>Object</tt>) <strong>reverse</strong>
|
1593
|
+
|
1594
|
+
|
1595
|
+
|
1596
|
+
|
1597
|
+
|
1598
|
+
</h3><table class="source_code">
|
1599
|
+
<tr>
|
1600
|
+
<td>
|
1601
|
+
<pre class="lines">
|
1602
|
+
|
1603
|
+
|
1604
|
+
143
|
1605
|
+
144
|
1606
|
+
145</pre>
|
1607
|
+
</td>
|
1608
|
+
<td>
|
1609
|
+
<pre class="code"><span class="info file"># File 'lib/cw/words.rb', line 143</span>
|
1610
|
+
|
1611
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_reverse'>reverse</span>
|
1612
|
+
<span class='ivar'>@words</span><span class='period'>.</span><span class='id identifier rubyid_reverse!'>reverse!</span>
|
1613
|
+
<span class='kw'>end</span></pre>
|
1614
|
+
</td>
|
1615
|
+
</tr>
|
1616
|
+
</table>
|
1617
|
+
</div>
|
1618
|
+
|
1619
|
+
<div class="method_details ">
|
1620
|
+
<h3 class="signature " id="shuffle-instance_method">
|
1621
|
+
|
1622
|
+
- (<tt>Object</tt>) <strong>shuffle</strong>
|
1623
|
+
|
1624
|
+
|
1625
|
+
|
1626
|
+
|
1627
|
+
|
1628
|
+
</h3><table class="source_code">
|
1629
|
+
<tr>
|
1630
|
+
<td>
|
1631
|
+
<pre class="lines">
|
1632
|
+
|
1633
|
+
|
1634
|
+
68
|
1635
|
+
69
|
1636
|
+
70</pre>
|
1637
|
+
</td>
|
1638
|
+
<td>
|
1639
|
+
<pre class="code"><span class="info file"># File 'lib/cw/words.rb', line 68</span>
|
1640
|
+
|
1641
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_shuffle'>shuffle</span>
|
1642
|
+
<span class='ivar'>@words</span><span class='period'>.</span><span class='id identifier rubyid_shuffle!'>shuffle!</span>
|
1643
|
+
<span class='kw'>end</span></pre>
|
1644
|
+
</td>
|
1645
|
+
</tr>
|
1646
|
+
</table>
|
1647
|
+
</div>
|
1648
|
+
|
1649
|
+
<div class="method_details ">
|
1650
|
+
<h3 class="signature " id="to_array-instance_method">
|
1651
|
+
|
1652
|
+
- (<tt>Object</tt>) <strong>to_array</strong>
|
1653
|
+
|
1654
|
+
|
1655
|
+
|
1656
|
+
|
1657
|
+
|
1658
|
+
</h3><table class="source_code">
|
1659
|
+
<tr>
|
1660
|
+
<td>
|
1661
|
+
<pre class="lines">
|
1662
|
+
|
1663
|
+
|
1664
|
+
72
|
1665
|
+
73
|
1666
|
+
74</pre>
|
1667
|
+
</td>
|
1668
|
+
<td>
|
1669
|
+
<pre class="code"><span class="info file"># File 'lib/cw/words.rb', line 72</span>
|
1670
|
+
|
1671
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_to_array'>to_array</span>
|
1672
|
+
<span class='ivar'>@words</span>
|
1673
|
+
<span class='kw'>end</span></pre>
|
1674
|
+
</td>
|
1675
|
+
</tr>
|
1676
|
+
</table>
|
1677
|
+
</div>
|
1678
|
+
|
1679
|
+
<div class="method_details ">
|
1680
|
+
<h3 class="signature " id="to_s-instance_method">
|
1681
|
+
|
1682
|
+
- (<tt>Object</tt>) <strong>to_s</strong>
|
1683
|
+
|
1684
|
+
|
1685
|
+
|
1686
|
+
|
1687
|
+
|
1688
|
+
</h3><table class="source_code">
|
1689
|
+
<tr>
|
1690
|
+
<td>
|
1691
|
+
<pre class="lines">
|
1692
|
+
|
1693
|
+
|
1694
|
+
80
|
1695
|
+
81
|
1696
|
+
82</pre>
|
1697
|
+
</td>
|
1698
|
+
<td>
|
1699
|
+
<pre class="code"><span class="info file"># File 'lib/cw/words.rb', line 80</span>
|
1700
|
+
|
1701
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_to_s'>to_s</span>
|
1702
|
+
<span class='ivar'>@words</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'> </span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
1703
|
+
<span class='kw'>end</span></pre>
|
1704
|
+
</td>
|
1705
|
+
</tr>
|
1706
|
+
</table>
|
1707
|
+
</div>
|
1708
|
+
|
1709
|
+
<div class="method_details ">
|
1710
|
+
<h3 class="signature " id="word_size-instance_method">
|
1711
|
+
|
1712
|
+
- (<tt>Object</tt>) <strong>word_size</strong>(size)
|
1713
|
+
|
1714
|
+
|
1715
|
+
|
1716
|
+
|
1717
|
+
|
1718
|
+
</h3><table class="source_code">
|
1719
|
+
<tr>
|
1720
|
+
<td>
|
1721
|
+
<pre class="lines">
|
1722
|
+
|
1723
|
+
|
1724
|
+
92
|
1725
|
+
93
|
1726
|
+
94</pre>
|
1727
|
+
</td>
|
1728
|
+
<td>
|
1729
|
+
<pre class="code"><span class="info file"># File 'lib/cw/words.rb', line 92</span>
|
1730
|
+
|
1731
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_word_size'>word_size</span><span class='lparen'>(</span><span class='id identifier rubyid_size'>size</span><span class='rparen'>)</span>
|
1732
|
+
<span class='ivar'>@words</span> <span class='op'>=</span> <span class='ivar'>@words</span><span class='period'>.</span><span class='id identifier rubyid_select'>select</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_wrd'>wrd</span><span class='op'>|</span> <span class='id identifier rubyid_wrd'>wrd</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='op'>==</span> <span class='id identifier rubyid_size'>size</span><span class='rbrace'>}</span>
|
1733
|
+
<span class='kw'>end</span></pre>
|
1734
|
+
</td>
|
1735
|
+
</tr>
|
1736
|
+
</table>
|
1737
|
+
</div>
|
1738
|
+
|
1739
|
+
</div>
|
1740
|
+
|
1741
|
+
</div>
|
1742
|
+
|
1743
|
+
<div id="footer">
|
1744
|
+
Generated on Mon May 23 21:20:16 2016 by
|
1745
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1746
|
+
0.8.7.6 (ruby-2.2.0).
|
1747
|
+
</div>
|
1748
|
+
|
1749
|
+
</body>
|
1750
|
+
</html>
|