Sha256: 48ae0e9793921cd11244dd0015916822d619d82ab6e0b122f652403efd4898d8
Contents?: true
Size: 621 Bytes
Versions: 3
Compression:
Stored size: 621 Bytes
Contents
module Sdbport class Config def initialize @config = load_config_file end def access_key(account) if @config.has_key? account @config[account].fetch 'access_key', nil else nil end end def secret_key(account) if @config.has_key? account @config[account].fetch 'secret_key', nil else nil end end private def load_config_file config_file = "#{ENV['HOME']}/.sdbport.yml" if File.exists? config_file YAML::load(File.open(config_file)) else Hash.new end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
sdbport-0.4.1 | lib/sdbport/config.rb |
sdbport-0.4.0 | lib/sdbport/config.rb |
sdbport-0.3.0 | lib/sdbport/config.rb |