Class: Tmrw::ContainersCommand

Inherits:
Dry::CLI::Command
  • Object
show all
Includes:
Color
Defined in:
lib/tmrw/containers_command.rb

Instance Method Summary collapse

Methods included from Color

#blue, #green, #red

Instance Method Details

#callObject



7
8
9
10
11
12
13
14
15
16
# File 'lib/tmrw/containers_command.rb', line 7

def call(*)
  puts "Containers:"
  containers.each do |c|
    if c[:status] == "running"
      print c[:name], ": ", green(c[:status]), "\n"
    else
      print c[:name], ": ", red(c[:status]), "\n"
    end
  end
end