Class: Flo::CredStore::YamlStore
- Inherits:
-
Object
- Object
- Flo::CredStore::YamlStore
- Defined in:
- lib/flo/cred_store/yaml_store.rb
Instance Method Summary collapse
-
#credentials_for(provider_sym) ⇒ Flo::CredStore::Creds
Returns the credentials for the requested provider.
-
#initialize(location = nil) ⇒ YamlStore
constructor
A new instance of YamlStore.
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
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 |