Sha256: 942b1e5b9c1c92422788fe048756432f6ef0dac69ffc78088dc82abc96f3e031
Contents?: true
Size: 471 Bytes
Versions: 19
Compression:
Stored size: 471 Bytes
Contents
require 'yaml' module Stash class Config def initialize(config_file = "#{ENV['HOME']}/.stashconfig.yml") @config_file = config_file fail "#{@config_file} does not exist" unless File.exist?(@config_file) end def host config['stash_url'] end def user config['username'] end def password config['password'] end private def config @config ||= YAML.load_file(@config_file) end end end
Version data entries
19 entries across 19 versions & 2 rubygems