Class: JCF::CLI::Commands::CF::ServiceOfferings

Inherits:
JCF::CLI::Command
  • Object
show all
Defined in:
lib/jcf/cli/commands/cf/service_offerings.rb

Instance Method Summary collapse

Methods inherited from JCF::CLI::Command

inherited

Instance Method Details

#call(name: nil, **options) ⇒ Object



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

def call(name: nil, **options)
  data = if name
           JCF::CF::ServiceOffering.find_by(name: name)
         else
           JCF::CF::ServiceOffering.all(organization_guids: options[:org])
         end

  out.puts formatter.format(data: JCF::CF::Base.format(data))
end