Sha256: 9a275e9f713b2d28ffe1766b93b05eff7caad33d3970261998e8c6a1079f1b31
Contents?: true
Size: 363 Bytes
Versions: 8
Compression:
Stored size: 363 Bytes
Contents
module Pact module HashRefinements refine Hash do def compact h = {} each do |key, value| h[key] = value unless value == nil end h end unless Hash.method_defined? :compact def compact! reject! {|_key, value| value == nil} end unless Hash.method_defined? :compact! end end end
Version data entries
8 entries across 8 versions & 1 rubygems