class Spty::Command::ToggleCommand

Constants

ASCRIPT_PLAYER_TOGGLE

Toggle player play / pause

Public Class Methods

call(_, command = 'toggle') click to toggle source
# File lib/spty/commands/toggle_command.rb, line 7
def self.call(_, command = 'toggle')
  return unless running?

  Spty::AppleScriptRunner.(ASCRIPT_PLAYER_TOGGLE)
  Spty::Command::StateCommand.(nil, command)
end