Class: OhBoshWillItFit::FogCredentials
- Inherits:
-
Object
- Object
- OhBoshWillItFit::FogCredentials
- Defined in:
- lib/ohboshwillitfit/fog_credentials.rb
Class Method Summary collapse
Class Method Details
.load_from_file(fog_key, fog_file = "~/.fog") ⇒ Object
3 4 5 6 7 8 |
# File 'lib/ohboshwillitfit/fog_credentials.rb', line 3 def self.load_from_file(fog_key, fog_file="~/.fog") fog_file = File.(fog_file) return nil unless File.exists?(fog_file) credentials = YAML.load_file(fog_file) credentials[fog_key.to_sym] || credentials[fog_key.to_s] end |