fantasy 0.1.13 → 0.1.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +22 -1
- data/.yardopts +4 -0
- data/CHANGELOG.md +6 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +55 -0
- data/README.md +14 -6
- data/docs/Actor.html +2737 -0
- data/docs/Background.html +961 -0
- data/docs/Camera.html +791 -0
- data/docs/Clock.html +753 -0
- data/docs/Color.html +776 -0
- data/docs/Coordinates.html +730 -0
- data/docs/Cursor.html +752 -0
- data/docs/Disk.html +236 -0
- data/docs/Draggable.html +198 -0
- data/docs/Fantasy.html +121 -0
- data/docs/Game.html +904 -0
- data/docs/Global.html +2791 -0
- data/docs/Gravitier.html +179 -0
- data/docs/HudImage.html +979 -0
- data/docs/HudText.html +1151 -0
- data/docs/Image.html +506 -0
- data/docs/Jumper.html +189 -0
- data/docs/Mouse.html +226 -0
- data/docs/MoveByCursor.html +374 -0
- data/docs/MoveByDirection.html +179 -0
- data/docs/Mover.html +305 -0
- data/docs/Music.html +524 -0
- data/docs/Shape.html +1057 -0
- data/docs/Sound.html +374 -0
- data/docs/Tilemap.html +491 -0
- data/docs/Tween.html +186 -0
- data/docs/UserInputs.html +879 -0
- data/docs/Utils.html +345 -0
- data/docs/_index.html +346 -0
- data/docs/class_list.html +51 -0
- data/docs/css/common.css +1 -0
- data/docs/css/full_list.css +58 -0
- data/docs/css/style.css +497 -0
- data/docs/file.CHANGELOG.html +121 -0
- data/docs/file.README.html +599 -0
- data/docs/file_list.html +61 -0
- data/docs/frames.html +17 -0
- data/docs/index.html +599 -0
- data/docs/js/app.js +314 -0
- data/docs/js/full_list.js +216 -0
- data/docs/js/jquery.js +4 -0
- data/docs/method_list.html +1931 -0
- data/docs/top-level-namespace.html +978 -0
- data/lib/fantasy/actor.rb +455 -123
- data/lib/fantasy/background.rb +109 -13
- data/lib/fantasy/base.rb +113 -1
- data/lib/fantasy/camera.rb +95 -11
- data/lib/fantasy/clock.rb +4 -2
- data/lib/fantasy/color.rb +158 -153
- data/lib/fantasy/coordinates.rb +5 -9
- data/lib/fantasy/cursor.rb +2 -1
- data/lib/fantasy/disk.rb +12 -8
- data/lib/fantasy/draggable.rb +22 -1
- data/lib/fantasy/global.rb +59 -31
- data/lib/fantasy/hud_image.rb +5 -3
- data/lib/fantasy/hud_text.rb +6 -2
- data/lib/fantasy/image.rb +12 -4
- data/lib/fantasy/includes/gravitier.rb +2 -0
- data/lib/fantasy/includes/jumper.rb +3 -2
- data/lib/fantasy/includes/log.rb +12 -0
- data/lib/fantasy/includes/move_by_cursors.rb +24 -15
- data/lib/fantasy/includes/move_by_direction.rb +2 -0
- data/lib/fantasy/includes/mover.rb +3 -0
- data/lib/fantasy/includes/user_inputs.rb +6 -0
- data/lib/fantasy/loop.rb +41 -44
- data/lib/fantasy/mouse.rb +2 -0
- data/lib/fantasy/music.rb +4 -2
- data/lib/fantasy/shape.rb +11 -2
- data/lib/fantasy/sound.rb +3 -1
- data/lib/fantasy/tilemap.rb +19 -13
- data/lib/fantasy/tween.rb +3 -1
- data/lib/fantasy/utils.rb +7 -13
- data/lib/fantasy/version.rb +1 -1
- data/lib/fantasy.rb +2 -0
- metadata +90 -4
- data/fantasy.gemspec +0 -40
- data/fonts/VT323-Regular.ttf +0 -0
data/docs/Music.html
ADDED
@@ -0,0 +1,524 @@
|
|
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
|
+
Module: Music
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.27
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" />
|
16
|
+
|
17
|
+
<script type="text/javascript">
|
18
|
+
pathId = "Music";
|
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 (M)</a> »
|
40
|
+
|
41
|
+
|
42
|
+
<span class="title">Music</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>Module: Music
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<dl>
|
80
|
+
<dt>Defined in:</dt>
|
81
|
+
<dd>lib/fantasy/music.rb</dd>
|
82
|
+
</dl>
|
83
|
+
|
84
|
+
</div>
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
<h2>
|
95
|
+
Class Method Summary
|
96
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
97
|
+
</h2>
|
98
|
+
|
99
|
+
<ul class="summary">
|
100
|
+
|
101
|
+
<li class="public ">
|
102
|
+
<span class="summary_signature">
|
103
|
+
|
104
|
+
<a href="#base_path-class_method" title="base_path (class method)">.<strong>base_path</strong> ⇒ Object </a>
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
</span>
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
119
|
+
|
120
|
+
</li>
|
121
|
+
|
122
|
+
|
123
|
+
<li class="public ">
|
124
|
+
<span class="summary_signature">
|
125
|
+
|
126
|
+
<a href="#locate_music-class_method" title="locate_music (class method)">.<strong>locate_music</strong>(music_name) ⇒ Object </a>
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
</span>
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
141
|
+
|
142
|
+
</li>
|
143
|
+
|
144
|
+
|
145
|
+
<li class="public ">
|
146
|
+
<span class="summary_signature">
|
147
|
+
|
148
|
+
<a href="#play-class_method" title="play (class method)">.<strong>play</strong>(music_name, volume: nil) ⇒ Object </a>
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
</span>
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
163
|
+
|
164
|
+
</li>
|
165
|
+
|
166
|
+
|
167
|
+
<li class="public ">
|
168
|
+
<span class="summary_signature">
|
169
|
+
|
170
|
+
<a href="#preload_musics-class_method" title="preload_musics (class method)">.<strong>preload_musics</strong> ⇒ Object </a>
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
</span>
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
185
|
+
|
186
|
+
</li>
|
187
|
+
|
188
|
+
|
189
|
+
<li class="public ">
|
190
|
+
<span class="summary_signature">
|
191
|
+
|
192
|
+
<a href="#stop-class_method" title="stop (class method)">.<strong>stop</strong> ⇒ Object </a>
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
</span>
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
207
|
+
|
208
|
+
</li>
|
209
|
+
|
210
|
+
|
211
|
+
<li class="public ">
|
212
|
+
<span class="summary_signature">
|
213
|
+
|
214
|
+
<a href="#volume-class_method" title="volume (class method)">.<strong>volume</strong> ⇒ Object </a>
|
215
|
+
|
216
|
+
|
217
|
+
|
218
|
+
</span>
|
219
|
+
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
229
|
+
|
230
|
+
</li>
|
231
|
+
|
232
|
+
|
233
|
+
<li class="public ">
|
234
|
+
<span class="summary_signature">
|
235
|
+
|
236
|
+
<a href="#volume=-class_method" title="volume= (class method)">.<strong>volume=</strong>(value) ⇒ Object </a>
|
237
|
+
|
238
|
+
|
239
|
+
|
240
|
+
</span>
|
241
|
+
|
242
|
+
|
243
|
+
|
244
|
+
|
245
|
+
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
|
250
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
251
|
+
|
252
|
+
</li>
|
253
|
+
|
254
|
+
|
255
|
+
</ul>
|
256
|
+
|
257
|
+
|
258
|
+
|
259
|
+
|
260
|
+
<div id="class_method_details" class="method_details_list">
|
261
|
+
<h2>Class Method Details</h2>
|
262
|
+
|
263
|
+
|
264
|
+
<div class="method_details first">
|
265
|
+
<h3 class="signature first" id="base_path-class_method">
|
266
|
+
|
267
|
+
.<strong>base_path</strong> ⇒ <tt>Object</tt>
|
268
|
+
|
269
|
+
|
270
|
+
|
271
|
+
|
272
|
+
|
273
|
+
</h3><table class="source_code">
|
274
|
+
<tr>
|
275
|
+
<td>
|
276
|
+
<pre class="lines">
|
277
|
+
|
278
|
+
|
279
|
+
51
|
280
|
+
52
|
281
|
+
53</pre>
|
282
|
+
</td>
|
283
|
+
<td>
|
284
|
+
<pre class="code"><span class="info file"># File 'lib/fantasy/music.rb', line 51</span>
|
285
|
+
|
286
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_base_path'>base_path</span>
|
287
|
+
<span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='const'>Dir</span><span class='period'>.</span><span class='id identifier rubyid_pwd'>pwd</span><span class='embexpr_end'>}</span><span class='tstring_content'>/musics</span><span class='tstring_end'>"</span></span>
|
288
|
+
<span class='kw'>end</span></pre>
|
289
|
+
</td>
|
290
|
+
</tr>
|
291
|
+
</table>
|
292
|
+
</div>
|
293
|
+
|
294
|
+
<div class="method_details ">
|
295
|
+
<h3 class="signature " id="locate_music-class_method">
|
296
|
+
|
297
|
+
.<strong>locate_music</strong>(music_name) ⇒ <tt>Object</tt>
|
298
|
+
|
299
|
+
|
300
|
+
|
301
|
+
|
302
|
+
|
303
|
+
</h3><table class="source_code">
|
304
|
+
<tr>
|
305
|
+
<td>
|
306
|
+
<pre class="lines">
|
307
|
+
|
308
|
+
|
309
|
+
29
|
310
|
+
30
|
311
|
+
31
|
312
|
+
32
|
313
|
+
33
|
314
|
+
34
|
315
|
+
35
|
316
|
+
36
|
317
|
+
37
|
318
|
+
38
|
319
|
+
39
|
320
|
+
40
|
321
|
+
41</pre>
|
322
|
+
</td>
|
323
|
+
<td>
|
324
|
+
<pre class="code"><span class="info file"># File 'lib/fantasy/music.rb', line 29</span>
|
325
|
+
|
326
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_locate_music'>locate_music</span><span class='lparen'>(</span><span class='id identifier rubyid_music_name'>music_name</span><span class='rparen'>)</span>
|
327
|
+
<span class='kw'>return</span> <span class='cvar'>@@musics</span><span class='lbracket'>[</span><span class='id identifier rubyid_music_name'>music_name</span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='cvar'>@@musics</span><span class='lbracket'>[</span><span class='id identifier rubyid_music_name'>music_name</span><span class='rbracket'>]</span>
|
328
|
+
|
329
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Initialize Music: '</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_music_name'>music_name</span><span class='embexpr_end'>}</span><span class='tstring_content'>'</span><span class='tstring_end'>"</span></span>
|
330
|
+
|
331
|
+
<span class='id identifier rubyid_file_name'>file_name</span> <span class='op'>=</span> <span class='const'>Dir</span><span class='period'>.</span><span class='id identifier rubyid_entries'>entries</span><span class='lparen'>(</span><span class='id identifier rubyid_base_path'>base_path</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_find'>find</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_e'>e</span><span class='op'>|</span> <span class='id identifier rubyid_e'>e</span> <span class='op'>=~</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_music_name'>music_name</span><span class='embexpr_end'>}</span><span class='tstring_content'>($|\.)</span><span class='regexp_end'>/</span></span> <span class='rbrace'>}</span>
|
332
|
+
|
333
|
+
<span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Music file not found with name '</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_music_name'>music_name</span><span class='embexpr_end'>}</span><span class='tstring_content'>'</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_file_name'>file_name</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
334
|
+
|
335
|
+
<span class='cvar'>@@musics</span><span class='lbracket'>[</span><span class='id identifier rubyid_music_name'>music_name</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='const'>Gosu</span><span class='op'>::</span><span class='const'>Song</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_base_path'>base_path</span><span class='embexpr_end'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_file_name'>file_name</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
336
|
+
|
337
|
+
<span class='cvar'>@@musics</span><span class='lbracket'>[</span><span class='id identifier rubyid_music_name'>music_name</span><span class='rbracket'>]</span>
|
338
|
+
<span class='kw'>end</span></pre>
|
339
|
+
</td>
|
340
|
+
</tr>
|
341
|
+
</table>
|
342
|
+
</div>
|
343
|
+
|
344
|
+
<div class="method_details ">
|
345
|
+
<h3 class="signature " id="play-class_method">
|
346
|
+
|
347
|
+
.<strong>play</strong>(music_name, volume: nil) ⇒ <tt>Object</tt>
|
348
|
+
|
349
|
+
|
350
|
+
|
351
|
+
|
352
|
+
|
353
|
+
</h3><table class="source_code">
|
354
|
+
<tr>
|
355
|
+
<td>
|
356
|
+
<pre class="lines">
|
357
|
+
|
358
|
+
|
359
|
+
8
|
360
|
+
9
|
361
|
+
10
|
362
|
+
11
|
363
|
+
12
|
364
|
+
13
|
365
|
+
14
|
366
|
+
15</pre>
|
367
|
+
</td>
|
368
|
+
<td>
|
369
|
+
<pre class="code"><span class="info file"># File 'lib/fantasy/music.rb', line 8</span>
|
370
|
+
|
371
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_play'>play</span><span class='lparen'>(</span><span class='id identifier rubyid_music_name'>music_name</span><span class='comma'>,</span> <span class='label'>volume:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
372
|
+
<span class='id identifier rubyid_stop'>stop</span>
|
373
|
+
|
374
|
+
<span class='cvar'>@@actual_song</span> <span class='op'>=</span> <span class='id identifier rubyid_locate_music'>locate_music</span><span class='lparen'>(</span><span class='id identifier rubyid_music_name'>music_name</span><span class='rparen'>)</span>
|
375
|
+
<span class='cvar'>@@actual_song</span><span class='period'>.</span><span class='id identifier rubyid_play'>play</span><span class='lparen'>(</span><span class='kw'>true</span><span class='rparen'>)</span>
|
376
|
+
|
377
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_volume'>volume</span> <span class='op'>=</span> <span class='id identifier rubyid_volume'>volume</span> <span class='kw'>unless</span> <span class='id identifier rubyid_volume'>volume</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
378
|
+
<span class='kw'>end</span></pre>
|
379
|
+
</td>
|
380
|
+
</tr>
|
381
|
+
</table>
|
382
|
+
</div>
|
383
|
+
|
384
|
+
<div class="method_details ">
|
385
|
+
<h3 class="signature " id="preload_musics-class_method">
|
386
|
+
|
387
|
+
.<strong>preload_musics</strong> ⇒ <tt>Object</tt>
|
388
|
+
|
389
|
+
|
390
|
+
|
391
|
+
|
392
|
+
|
393
|
+
</h3><table class="source_code">
|
394
|
+
<tr>
|
395
|
+
<td>
|
396
|
+
<pre class="lines">
|
397
|
+
|
398
|
+
|
399
|
+
43
|
400
|
+
44
|
401
|
+
45
|
402
|
+
46
|
403
|
+
47
|
404
|
+
48
|
405
|
+
49</pre>
|
406
|
+
</td>
|
407
|
+
<td>
|
408
|
+
<pre class="code"><span class="info file"># File 'lib/fantasy/music.rb', line 43</span>
|
409
|
+
|
410
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_preload_musics'>preload_musics</span>
|
411
|
+
<span class='kw'>return</span> <span class='kw'>unless</span> <span class='const'>Dir</span><span class='period'>.</span><span class='id identifier rubyid_exist?'>exist?</span><span class='lparen'>(</span><span class='id identifier rubyid_base_path'>base_path</span><span class='rparen'>)</span>
|
412
|
+
|
413
|
+
<span class='const'>Dir</span><span class='period'>.</span><span class='id identifier rubyid_each_child'>each_child</span><span class='lparen'>(</span><span class='id identifier rubyid_base_path'>base_path</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_file_name'>file_name</span><span class='op'>|</span>
|
414
|
+
<span class='id identifier rubyid_locate_music'>locate_music</span><span class='lparen'>(</span><span class='id identifier rubyid_file_name'>file_name</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_file_name'>file_name</span><span class='period'>.</span><span class='id identifier rubyid_start_with?'>start_with?</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>
|
415
|
+
<span class='kw'>end</span>
|
416
|
+
<span class='kw'>end</span></pre>
|
417
|
+
</td>
|
418
|
+
</tr>
|
419
|
+
</table>
|
420
|
+
</div>
|
421
|
+
|
422
|
+
<div class="method_details ">
|
423
|
+
<h3 class="signature " id="stop-class_method">
|
424
|
+
|
425
|
+
.<strong>stop</strong> ⇒ <tt>Object</tt>
|
426
|
+
|
427
|
+
|
428
|
+
|
429
|
+
|
430
|
+
|
431
|
+
</h3><table class="source_code">
|
432
|
+
<tr>
|
433
|
+
<td>
|
434
|
+
<pre class="lines">
|
435
|
+
|
436
|
+
|
437
|
+
17
|
438
|
+
18
|
439
|
+
19</pre>
|
440
|
+
</td>
|
441
|
+
<td>
|
442
|
+
<pre class="code"><span class="info file"># File 'lib/fantasy/music.rb', line 17</span>
|
443
|
+
|
444
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_stop'>stop</span>
|
445
|
+
<span class='cvar'>@@actual_song</span><span class='op'>&.</span><span class='id identifier rubyid_stop'>stop</span>
|
446
|
+
<span class='kw'>end</span></pre>
|
447
|
+
</td>
|
448
|
+
</tr>
|
449
|
+
</table>
|
450
|
+
</div>
|
451
|
+
|
452
|
+
<div class="method_details ">
|
453
|
+
<h3 class="signature " id="volume-class_method">
|
454
|
+
|
455
|
+
.<strong>volume</strong> ⇒ <tt>Object</tt>
|
456
|
+
|
457
|
+
|
458
|
+
|
459
|
+
|
460
|
+
|
461
|
+
</h3><table class="source_code">
|
462
|
+
<tr>
|
463
|
+
<td>
|
464
|
+
<pre class="lines">
|
465
|
+
|
466
|
+
|
467
|
+
21
|
468
|
+
22
|
469
|
+
23</pre>
|
470
|
+
</td>
|
471
|
+
<td>
|
472
|
+
<pre class="code"><span class="info file"># File 'lib/fantasy/music.rb', line 21</span>
|
473
|
+
|
474
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_volume'>volume</span>
|
475
|
+
<span class='cvar'>@@actual_song</span><span class='op'>&.</span><span class='id identifier rubyid_volume'>volume</span>
|
476
|
+
<span class='kw'>end</span></pre>
|
477
|
+
</td>
|
478
|
+
</tr>
|
479
|
+
</table>
|
480
|
+
</div>
|
481
|
+
|
482
|
+
<div class="method_details ">
|
483
|
+
<h3 class="signature " id="volume=-class_method">
|
484
|
+
|
485
|
+
.<strong>volume=</strong>(value) ⇒ <tt>Object</tt>
|
486
|
+
|
487
|
+
|
488
|
+
|
489
|
+
|
490
|
+
|
491
|
+
</h3><table class="source_code">
|
492
|
+
<tr>
|
493
|
+
<td>
|
494
|
+
<pre class="lines">
|
495
|
+
|
496
|
+
|
497
|
+
25
|
498
|
+
26
|
499
|
+
27</pre>
|
500
|
+
</td>
|
501
|
+
<td>
|
502
|
+
<pre class="code"><span class="info file"># File 'lib/fantasy/music.rb', line 25</span>
|
503
|
+
|
504
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_volume='>volume=</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
|
505
|
+
<span class='cvar'>@@actual_song</span><span class='period'>.</span><span class='id identifier rubyid_volume'>volume</span> <span class='op'>=</span> <span class='id identifier rubyid_value'>value</span> <span class='kw'>unless</span> <span class='cvar'>@@actual_song</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
506
|
+
<span class='kw'>end</span></pre>
|
507
|
+
</td>
|
508
|
+
</tr>
|
509
|
+
</table>
|
510
|
+
</div>
|
511
|
+
|
512
|
+
</div>
|
513
|
+
|
514
|
+
</div>
|
515
|
+
|
516
|
+
<div id="footer">
|
517
|
+
Generated on Sat Apr 2 14:24:12 2022 by
|
518
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
519
|
+
0.9.27 (ruby-3.0.2).
|
520
|
+
</div>
|
521
|
+
|
522
|
+
</div>
|
523
|
+
</body>
|
524
|
+
</html>
|