Class: ServiceHelper

Inherits:
Object
  • Object
show all
Defined in:
lib/cf/cli/service/service_helper.rb

Instance Method Summary collapse

Constructor Details

#initialize(service) ⇒ ServiceHelper

Returns a new instance of ServiceHelper.


2
3
4
# File 'lib/cf/cli/service/service_helper.rb', line 2

def initialize(service)
  @service = service
end

Instance Method Details

#descriptionObject


22
23
24
# File 'lib/cf/cli/service/service_helper.rb', line 22

def description
  @service.description
end

#labelObject


6
7
8
# File 'lib/cf/cli/service/service_helper.rb', line 6

def label
  @service.label
end

#providerObject


10
11
12
# File 'lib/cf/cli/service/service_helper.rb', line 10

def provider
  @service.provider || 'n/a'
end

#service_plansObject


18
19
20
# File 'lib/cf/cli/service/service_helper.rb', line 18

def service_plans
  @service.service_plans.map(&:name).join(', ')
end

#versionObject


14
15
16
# File 'lib/cf/cli/service/service_helper.rb', line 14

def version
  @service.version || 'n/a'
end