Class: Spty::Command::SkipCommand

Inherits:
BaseCommand show all
Defined in:
lib/spty/commands/skip_command.rb

Constant Summary collapse

ASCRIPT_TRACK_SKIP =
<<-EOL
  tell application "Spotify"
    next track
  end tell
EOL

Constants inherited from BaseCommand

BaseCommand::ASCRIPT_PLAYER_DETECT

Class Method Summary collapse

Methods inherited from BaseCommand

running?

Class Method Details

.call(_, command = 'skip') ⇒ Object



8
9
10
11
12
13
# File 'lib/spty/commands/skip_command.rb', line 8

def self.call(_, command = 'skip')
  return unless running?

  Spty::AppleScriptRunner.(ASCRIPT_TRACK_SKIP)
  Spty::Command::InfoCommand.(nil, command)
end