Class: Commands::Skip
- Inherits:
-
Object
- Object
- Commands::Skip
- Defined in:
- lib/commands/skip.rb
Class Method Summary collapse
Instance Method Summary collapse
- #go ⇒ Object
-
#initialize(args, settings) ⇒ Skip
constructor
A new instance of Skip.
- #media? ⇒ Boolean
- #respond ⇒ Object
Constructor Details
Class Method Details
.matches ⇒ Object
21 22 23 |
# File 'lib/commands/skip.rb', line 21 def self.matches ['skip', 'skip this song', 'next', 'next song'] end |
Instance Method Details
#go ⇒ Object
9 10 11 |
# File 'lib/commands/skip.rb', line 9 def go `osascript -e 'tell application "#{@app}" to next track'` end |
#media? ⇒ Boolean
17 18 19 |
# File 'lib/commands/skip.rb', line 17 def media? false end |
#respond ⇒ Object
13 14 15 |
# File 'lib/commands/skip.rb', line 13 def respond "Now playing: #{`osascript -e 'tell application "#{@app}" to get the name of the current track'`}".chomp rescue "" end |