Class: Shoes::Sound
- Inherits:
-
Object
- Object
- Shoes::Sound
- Includes:
- Common::Inspect
- Defined in:
- shoes-core/lib/shoes/sound.rb
Instance Attribute Summary collapse
-
#app ⇒ Object
readonly
Returns the value of attribute app.
-
#filepath ⇒ Object
readonly
Returns the value of attribute filepath.
-
#gui ⇒ Object
readonly
Returns the value of attribute gui.
-
#parent ⇒ Object
readonly
Returns the value of attribute parent.
Instance Method Summary collapse
-
#initialize(parent, filepath, _opts = {}, &_blk) ⇒ Sound
constructor
A new instance of Sound.
- #play ⇒ Object
Methods included from Common::Inspect
Constructor Details
#initialize(parent, filepath, _opts = {}, &_blk) ⇒ Sound
Returns a new instance of Sound.
7 8 9 10 11 12 13 |
# File 'shoes-core/lib/shoes/sound.rb', line 7 def initialize(parent, filepath, _opts = {}, &_blk) @app = parent @parent = parent @filepath = filepath @gui = Shoes.backend_for(self) end |
Instance Attribute Details
#app ⇒ Object (readonly)
Returns the value of attribute app.
15 16 17 |
# File 'shoes-core/lib/shoes/sound.rb', line 15 def app @app end |
#filepath ⇒ Object (readonly)
Returns the value of attribute filepath.
15 16 17 |
# File 'shoes-core/lib/shoes/sound.rb', line 15 def filepath @filepath end |
#gui ⇒ Object (readonly)
Returns the value of attribute gui.
15 16 17 |
# File 'shoes-core/lib/shoes/sound.rb', line 15 def gui @gui end |
#parent ⇒ Object (readonly)
Returns the value of attribute parent.
15 16 17 |
# File 'shoes-core/lib/shoes/sound.rb', line 15 def parent @parent end |
Instance Method Details
#play ⇒ Object
17 18 19 |
# File 'shoes-core/lib/shoes/sound.rb', line 17 def play @gui.play end |