lib/pallets/context.rb in pallets-0.3.0 vs lib/pallets/context.rb in pallets-0.4.0

- old
+ new

@@ -1,9 +1,15 @@ module Pallets # Hash-like class that additionally holds a buffer for all write operations + # that occur after initialization class Context < Hash def []=(key, value) buffer[key] = value + super + end + + def merge!(other_hash) + buffer.merge!(other_hash) super end def buffer @buffer ||= {}