module ConfigHound

Constants

Error
LoadError
VERSION

Public Class Methods

deep_merge_into(h1, h2) click to toggle source
# File lib/config_hound/deep_merge.rb, line 3
def self.deep_merge_into(h1, h2)
  return h2 unless h1.is_a?(Hash) && h2.is_a?(Hash)
  h1.merge(h2) do |_key, v1, v2|
    deep_merge_into(v1, v2)
  end
end
load(paths, options = {}) click to toggle source
# File lib/config_hound.rb, line 7
def self.load(paths, options = {})
  options = Hash[options]
  expand_refs = options.delete(:expand_refs)
  result = Loader.new(options).load(paths)
  result = Interpolation.expand(result) if expand_refs
  result
end