class Deis::Commands::Info

Public Instance Methods

output_hash(hash, indent = 0) click to toggle source
# File lib/deis/commands/info.rb, line 12
def output_hash(hash, indent = 0)
  hash.each do |k, v|
    case v
    when Hash
      puts ('  ' * indent) + k + ':'
      output_hash(v, indent + 1)
    when Array
      puts ('  ' * indent) + k + ':', *v.map { |i| ('  ' * (indent + 1)) + i.to_s }
    else
      puts ('  ' * indent) + "#{k}: #{v}"
    end
  end
end
run() click to toggle source
# File lib/deis/commands/info.rb, line 6
def run
  h = info(app)
  status "`#{app}` Information"
  output_hash h
end