Class: JCF::CLI::Commands::CF::Organizations

Inherits:
JCF::CLI::Command show all
Includes:
JCF::CF
Defined in:
lib/jcf/cli/commands/cf/organizations.rb

Instance Method Summary collapse

Methods included from JCF::CF

curl, do_curl, sanitize_url

Methods inherited from JCF::CLI::Command

inherited

Instance Method Details

#call(name: nil) ⇒ Object



15
16
17
18
19
20
21
22
# File 'lib/jcf/cli/commands/cf/organizations.rb', line 15

def call(name: nil, **)
  data = if name
           Organization.find_by(name: name)
         else
           Organization.all
         end
  out.puts formatter.format(data: JCF::CF::Base.format(data))
end