Class: Commands::Pause
- Inherits:
-
Object
- Object
- Commands::Pause
- Defined in:
- lib/commands/pause.rb
Class Method Summary collapse
Instance Method Summary collapse
- #go ⇒ Object
-
#initialize(args, settings) ⇒ Pause
constructor
A new instance of Pause.
- #media? ⇒ Boolean
- #respond ⇒ Object
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
.matches ⇒ Object
21 22 23 |
# File 'lib/commands/pause.rb', line 21 def self.matches ['pause', 'pause my music'] end |
Instance Method Details
#go ⇒ Object
9 10 11 |
# File 'lib/commands/pause.rb', line 9 def go `osascript -e 'tell application "#{@app}" to pause'` end |
#media? ⇒ Boolean
17 18 19 |
# File 'lib/commands/pause.rb', line 17 def media? false end |
#respond ⇒ Object
13 14 15 |
# File 'lib/commands/pause.rb', line 13 def respond "" end |