lib/itamae/node.rb in itamae-1.0.0.beta12 vs lib/itamae/node.rb in itamae-1.0.0.beta13
- old
+ new
@@ -2,8 +2,15 @@
require 'hashie'
require 'json'
module Itamae
class Node < Hashie::Mash
+ def reverse_merge(other_hash)
+ Hashie::Mash.new(other_hash).merge(self)
+ end
+
+ def reverse_merge!(other_hash)
+ self.replace(reverse_merge(other_hash))
+ end
end
end