Class: Sound
- Inherits:
-
Object
- Object
- Sound
- Defined in:
- lib/r2d/sound.rb
Overview
sound.rb
Instance Method Summary collapse
-
#initialize(path) ⇒ Sound
constructor
A new instance of Sound.
- #pause ⇒ Object
- #paused? ⇒ Boolean
- #play ⇒ Object
- #play_loop ⇒ Object
- #playing? ⇒ Boolean
- #stop ⇒ Object
- #volume ⇒ Object
Constructor Details
Instance Method Details
#pause ⇒ Object
17 18 19 |
# File 'lib/r2d/sound.rb', line 17 def pause @sound.pause end |
#paused? ⇒ Boolean
25 26 27 |
# File 'lib/r2d/sound.rb', line 25 def paused? @sound.paused? end |
#play ⇒ Object
9 10 11 |
# File 'lib/r2d/sound.rb', line 9 def play @sound.play end |
#play_loop ⇒ Object
13 14 15 |
# File 'lib/r2d/sound.rb', line 13 def play_loop @sound.play(true) end |
#playing? ⇒ Boolean
21 22 23 |
# File 'lib/r2d/sound.rb', line 21 def @sound. end |
#stop ⇒ Object
29 30 31 |
# File 'lib/r2d/sound.rb', line 29 def stop @sound.stop end |
#volume ⇒ Object
33 34 35 |
# File 'lib/r2d/sound.rb', line 33 def volume @sound.volume end |