class CF::Organization::Orgs

Public Instance Methods

orgs() click to toggle source
# File lib/cf/cli/organization/orgs.rb, line 9
def orgs
  orgs =
    with_progress("Getting organizations") do
      client.organizations(:depth => 0).sort_by(&:name)
    end

  return if orgs.empty?

  line unless quiet?

  if input[:full]
    orgs.each do |o|
      invoke :org, :organization => o, :full => true
    end
  else
    table(
      %w{name},
      orgs.collect { |o| [c(o.name, :name)] })
  end
end