Method: Linecook::Commands::State#process

Defined in:
lib/linecook/commands/state.rb

#process(*hosts) ⇒ Object



18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/linecook/commands/state.rb', line 18

def process(*hosts)
  vm_names = resolve_vm_names(hosts)
  if hosts
    each_host(vm_names) do |host|
      puts "#{host}: #{state(host_map[host] || host)}"
    end
  else
    each_vm_name(vm_names) do |vm_name|
      puts "#{vm_name}: #{state(vm_name)}"
    end
  end
end