Class: ZQ::CLI
- Inherits:
-
Thor
- Object
- Thor
- ZQ::CLI
- Defined in:
- lib/zq/cli.rb
Instance Method Summary collapse
Instance Method Details
#list ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/zq/cli.rb', line 11 def list setup_env() orchestras = ZQ.live_orchestras fail NoOrchestrasFound if orchestras.empty? orchestras.each do |o| puts o end end |
#play(orchestra_name) ⇒ Object
23 24 25 26 27 28 |
# File 'lib/zq/cli.rb', line 23 def play(orchestra_name) setup_env() orchestra = ZQ.find_live_orchestra(orchestra_name) fail OrchestraDoesNotExist unless orchestra run(orchestra, [:forever], [:interval]) end |