Created
January 24, 2019 09:42
-
-
Save pooza/e6d915909a60c77afcd78c1c718280f2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module MulukhiyaTootProxy | |
class Config < Ginseng::Config | |
include Package | |
def self.deep_merge(src, target) | |
raise ArgumentError 'Not Hash' unless target.is_a?(Hash) | |
dest = (src.clone || {}).with_indifferent_access | |
target.each do |k, v| | |
dest[k] = v.is_a?(Hash) ? deep_merge(dest[k], v) : v | |
end | |
return dest.compact | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment