class Flo::CredStore::YamlStore
Public Class Methods
new(location=nil)
click to toggle source
# File lib/flo/cred_store/yaml_store.rb, line 17 def initialize(location=nil) @location = location || File.join(Dir.home, '.flo_creds.yml') end
Public Instance Methods
credentials_for(provider_sym)
click to toggle source
Returns the credentials for the requested provider @param provider_sym [Symbol] @return [Flo::CredStore::Creds]
# 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
Private Instance Methods
full_credentials_hash()
click to toggle source
# File lib/flo/cred_store/yaml_store.rb, line 31 def full_credentials_hash @full_credentials_hash ||= YAML.load(File.read(@location)) || {} end