Class: Tmrw::NamespacesCommand

Inherits:
Dry::CLI::Command
  • Object
show all
Includes:
Color
Defined in:
lib/tmrw/namespaces_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
17
18
19
20
21
22
23
# File 'lib/tmrw/namespaces_command.rb', line 7

def call(*)
  puts "Namespaces:"

  if namespaces.empty?
    print color.dim("There are no namespaces\n\n")

    return
  end

  namespaces.each do |namespace|
    if namespace[:active]
      puts green("> " + namespace[:name])
    else
      puts "  " + namespace[:name]
    end
  end
end