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