Sha256: 913108dc890aa287640badc67fd499c244169ba55625a419ac501b47ac4b3be1
Contents?: true
Size: 665 Bytes
Versions: 25
Compression:
Stored size: 665 Bytes
Contents
module Fission class Command class Status < Command def initialize(args=[]) super end def execute all_vms=Fission::VM.all vm_with_longest_name = all_vms.max { |a,b| a.name.length <=> b.name.length } max_name_length=vm_with_longest_name.name.length all_vms.each do |vm| status = vm.state Fission.ui.output_printf "%-#{max_name_length}s %s\n", vm.name, "["+status+"]" end end def option_parser optparse = OptionParser.new do |opts| opts.banner = "\nstatus usage: fission status" end optparse end end end end
Version data entries
25 entries across 25 versions & 1 rubygems