class CF::Organization::Org

Public Instance Methods

org() click to toggle source
# File lib/cf/cli/organization/org.rb, line 13
def org
  org = input[:organization]

  unless org
    return if quiet?
    fail "No current organization."
  end

  if quiet?
    puts org.name
    return
  end

  line "#{c(org.name, :name)}:"

  indented do
    line "domains: #{name_list(org.domains)}"

    if input[:full]
      line "spaces:"

      spaced(org.spaces(:depth => 2)) do |s|
        indented do
          invoke :space, :space => s
        end
      end
    else
      line "spaces: #{name_list(org.spaces)}"
    end
  end
end