Sha256: d21d4a87016d7374f03ca4b29ce64cc6e56af08e32fe1281d7a8bf66602a9e26

Contents?: true

Size: 398 Bytes

Versions: 3

Compression:

Stored size: 398 Bytes

Contents

module Polyfill
  module V2_4
    module Hash
      module Instance
        module Compact
          module Method
            def compact
              reject { |_, v| v.nil? }
            end
          end

          refine ::Hash do
            include Method
          end

          def self.included(base)
            base.include Method
          end
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
polyfill-0.6.0 lib/polyfill/v2_4/hash/instance/compact.rb
polyfill-0.5.0 lib/polyfill/v2_4/hash/instance/compact.rb
polyfill-0.4.0 lib/polyfill/v2_4/hash/instance/compact.rb