class Ettin::HashFactory
Loads and deeply merges targets into a hash structure.
Public Instance Methods
build(*targets)
click to toggle source
# File lib/ettin/hash_factory.rb, line 11 def build(*targets) hash = Hash.new(nil) targets .flatten .map {|target| Source.for(target) } .map(&:load) .map {|h| h.deep_transform_keys {|key| key.to_s.to_sym } } .each {|h| hash.deeper_merge!(h, overwrite_arrays: true) } hash end