class Hash

github.com/rails/rails/blob/fc5dd0b85189811062c85520fd70de8389b55aeb/activesupport/lib/active_support/core_ext/hash/compact.rb

Public Instance Methods

compact() click to toggle source
# File lib/ensure_hash_compact.rb, line 8
def compact
  select { |_, value| !value.nil? }
end