Class: Muzak::Plugin::Cava
- Inherits:
-
StubPlugin
- Object
- StubPlugin
- Muzak::Plugin::Cava
- Includes:
- Utils
- Defined in:
- lib/muzak/plugin/cava.rb
Instance Attribute Summary
Attributes inherited from StubPlugin
Instance Method Summary collapse
-
#initialize(instance) ⇒ Cava
constructor
A new instance of Cava.
- #player_activated ⇒ Object
- #player_deactivated ⇒ Object
Methods included from Utils
#album_art?, #debug, #debug?, #error, #fail_arity, #info, #music?, #output, #pretty, #verbose, #verbose?, #warn, #warn_arity
Methods inherited from StubPlugin
Constructor Details
#initialize(instance) ⇒ Cava
Returns a new instance of Cava.
8 9 10 11 12 |
# File 'lib/muzak/plugin/cava.rb', line 8 def initialize(instance) super @term_args = Shellwords.split instance.config["plugin-cava"] @pid = nil end |
Instance Method Details
#player_activated ⇒ Object
14 15 16 |
# File 'lib/muzak/plugin/cava.rb', line 14 def player_activated start_cava! unless cava_running? end |
#player_deactivated ⇒ Object
18 19 20 |
# File 'lib/muzak/plugin/cava.rb', line 18 def player_deactivated stop_cava! if cava_running? end |