class TraceTree::Config

Constants

DEFAULT

Public Class Methods

load() click to toggle source
# File lib/trace_tree/config.rb, line 11
def self.load
  config = DEFAULT
  custom = File.join ENV['HOME'], '.trace_tree_config'
  if File.exist?(custom) && (hash = YAML.load File.read custom)
    hash.select!{ |k, v| config.include? k }
    config = config.merge hash
  end
  OpenStruct.new config
end