Method: Hash#compact

Defined in:
lib/utils/hash_with_compact.rb

#compactObject



34
35
36
# File 'lib/utils/hash_with_compact.rb', line 34

def compact
  self.select { |_, value| value.is_a?(Hash) ? !value.compact_and_check_if_empty : !value.nil? }
end