Method: Mappru::Ext::HashExt#without_nil

Defined in:
lib/mappru/ext/hash_ext.rb

#without_nilObject



17
18
19
20
21
22
23
24
25
# File 'lib/mappru/ext/hash_ext.rb', line 17

def without_nil
  new_hash = {}

  self.each do |k, v|
    new_hash[k] = v if v
  end

  new_hash
end