Sha256: 9f8f441a05653dd7fa08503c6c05180cde491555123a5228f1abffa777827de6

Contents?: true

Size: 515 Bytes

Versions: 1

Compression:

Stored size: 515 Bytes

Contents

module Heirloom
  class Config

    attr_accessor = :access_key, :secret_key

    def initiatize(args={})
      if args[:config]
        self.access_key = args[:config][:access_key]
        self.secret_key = args[:config][:secret_key]
      else
        load_config_file
      end
    end

    def load_config_file
      config_file = "#{ENV['HOME']}/.heirloom.yml"
      c = YAML::load( File.open( config_file ) )

      self.access_key = c['access_key']
      self.secret_key = c['secret_key']
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
heirloom-0.0.5 lib/heirloom/config.rb