Class: Commands::Pause

Inherits:
Object
  • Object
show all
Defined in:
lib/commands/pause.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args, settings) ⇒ Pause

Returns a new instance of Pause.



5
6
7
# File 'lib/commands/pause.rb', line 5

def initialize(args, settings)
  @app = args.first || Helpers::Player.to_s || settings.get('default_player')
end

Class Method Details

.matchesObject



21
22
23
# File 'lib/commands/pause.rb', line 21

def self.matches
  ['pause', 'pause my music']
end

Instance Method Details

#goObject



9
10
11
# File 'lib/commands/pause.rb', line 9

def go
  `osascript -e 'tell application "#{@app}" to pause'`
end

#media?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/commands/pause.rb', line 17

def media?
  false
end

#respondObject



13
14
15
# File 'lib/commands/pause.rb', line 13

def respond
  ""
end