class Layer::Patch::Hash
Public Instance Methods
[]=(key, value)
click to toggle source
Calls superclass method
# File lib/layer/patch/hash.rb, line 11 def []=(key, value) patch.set(key, value.dup) super(key, wrap(key, value)) end
Also aliased as: store
clear()
click to toggle source
Calls superclass method
# File lib/layer/patch/hash.rb, line 17 def clear patch.replace({}) super end
delete(key)
click to toggle source
Calls superclass method
# File lib/layer/patch/hash.rb, line 22 def delete(key) patch.delete(key) super end
delete_if() { |key, value| ... }
click to toggle source
Calls superclass method
# File lib/layer/patch/hash.rb, line 27 def delete_if(&block) super do |key, value| result = yield(key, value) delete(key) if result result end end
Also aliased as: reject!
merge!(other_hash)
click to toggle source
Calls superclass method
# File lib/layer/patch/hash.rb, line 46 def merge!(other_hash) other_hash.each_pair do |key, value| patch.set(key, value) end super end
prepare_base(base)
click to toggle source
# File lib/layer/patch/hash.rb, line 5 def prepare_base(base) base.each_pair do |key, value| base[key] = wrap(key, value) end end
replace(other_hash)
click to toggle source
Calls superclass method
# File lib/layer/patch/hash.rb, line 41 def replace(other_hash) patch.replace(other_hash) super end
shift()
click to toggle source
Calls superclass method
# File lib/layer/patch/hash.rb, line 36 def shift patch.delete(keys.first) super end