Sha256: fe7a4b6c582c15f93eb9b8217478315f0808d9d6c5ef8ef75c7383ad5c9d62ab
Contents?: true
Size: 714 Bytes
Versions: 134
Compression:
Stored size: 714 Bytes
Contents
require 'yaml' class AwsConfig def initialize(opts={}) @opts = opts end def exclusions @exclusions ||=Exclusions.new(@opts[:exclude]) end def egress? @opts.key?(:egress) ? @opts[:egress] : true end def groups @opts[:groups] || {} end def format @opts[:format] || 'dot' end def debug? @opts[:debug] || false end def obfuscate? @opts[:obfuscate] || false end def self.load(file) config_opts = File.exist?(file) ? YAML.load_file(file) : {} AwsConfig.new(config_opts) end def merge(opts) AwsConfig.new(@opts.merge!(opts)) end def self.write(file) FileUtils.cp(File.expand_path('../opts.yml.sample', __FILE__), file) end end
Version data entries
134 entries across 134 versions & 1 rubygems