Class: ZQ::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/zq/cli.rb

Instance Method Summary collapse

Instance Method Details

#listObject



6
7
8
9
10
11
12
13
# File 'lib/zq/cli.rb', line 6

def list
  setup_env(options)
  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(options)
  orchestra = ZQ.find_live_orchestra(orchestra_name)
  fail OrchestraDoesNotExist unless orchestra
  run(orchestra, options[:forever], options[:interval])
end