Class: ZQ::CLI
- Inherits:
-
Thor
- Object
- Thor
- ZQ::CLI
- Defined in:
- lib/zq/cli.rb
Instance Method Summary collapse
Instance Method Details
#list ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/zq/cli.rb', line 6 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
18 19 20 21 22 23 |
# File 'lib/zq/cli.rb', line 18 def play(orchestra_name) setup_env() orchestra = ZQ.find_live_orchestra(orchestra_name) fail OrchestraDoesNotExist unless orchestra run(orchestra, [:forever], [:interval]) end |