Class: Flo::CredStore::YamlStore

Inherits:
Object
  • Object
show all
Defined in:
lib/flo/cred_store/yaml_store.rb

Instance Method Summary collapse

Constructor Details

#initialize(location = nil) ⇒ YamlStore

Returns a new instance of YamlStore.



17
18
19
# File 'lib/flo/cred_store/yaml_store.rb', line 17

def initialize(location=nil)
  @location = location || File.join(Dir.home, '.flo_creds.yml')
end

Instance Method Details

#credentials_for(provider_sym) ⇒ Flo::CredStore::Creds

Returns the credentials for the requested provider

Parameters:

  • provider_sym (Symbol)

Returns:



25
26
27
# File 'lib/flo/cred_store/yaml_store.rb', line 25

def credentials_for(provider_sym)
  Flo::CredStore::Creds.new(full_credentials_hash[provider_sym])
end