Sha256: 179aa5f995f9507c3b7e5c573ebfe6af87f928189eabb8cabfbc94e128eaa5d4
Contents?: true
Size: 381 Bytes
Versions: 1
Compression:
Stored size: 381 Bytes
Contents
module InheritedClassVar class Hash < Variable alias_method :merge, :change def default_value {} end def _change(hash1, hash2) method = options[:shallow] ? :merge! : :deep_merge! block = options[:reverse] ? Proc.new {|key,left,right| left } : Proc.new {|key,left,right| right } hash1.public_send(method, hash2, &block) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
inherited_class_var-1.0.0.beta1 | lib/inherited_class_var/hash.rb |