Sha256: 25cd0f02d9c88188f15d3f352a1fe9edb5c2d688ad123c26b591193b40cda458
Contents?: true
Size: 574 Bytes
Versions: 18
Compression:
Stored size: 574 Bytes
Contents
require 'logger' module Stackster class Config def initialize(args = {}) @config = load_config_file args[:config] @logger = args[:logger] ||= StacksterLogger.new end def access_key @config['access_key'] end def secret_key @config['secret_key'] end def region @config['region'] end def logger @logger end private def load_config_file(config = nil) config_file = "#{ENV['HOME']}/.stackster.yml" config ? config : (YAML::load File.open( config_file )) end end end
Version data entries
18 entries across 18 versions & 1 rubygems