Class: CF::App::Credentials

Inherits:
Object
  • Object
show all
Defined in:
lib/cf-app-utils/cf/app/credentials.rb

Class Method Summary collapse

Class Method Details

.find_by_service_label(label) ⇒ Object

Returns credentials for the first service with the given label.



17
18
19
20
# File 'lib/cf-app-utils/cf/app/credentials.rb', line 17

def find_by_service_label(label)
  service = Service.find_by_label(label)
  service['credentials'] if service
end

.find_by_service_name(name) ⇒ Object

Returns credentials for the service with the given name.



5
6
7
8
# File 'lib/cf-app-utils/cf/app/credentials.rb', line 5

def find_by_service_name(name)
  service = Service.find_by_name(name)
  service['credentials'] if service
end

.find_by_service_tag(tag) ⇒ Object

Returns credentials for the first service with the given tag.



11
12
13
14
# File 'lib/cf-app-utils/cf/app/credentials.rb', line 11

def find_by_service_tag(tag)
  service = Service.find_by_tag(tag)
  service['credentials'] if service
end