Guest User

Untitled

a guest
Dec 18th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.15 KB | None | 0 0
  1. def remove_empty_hash_element(h)
  2. if h and h.length>0
  3. h.each do |k,v|
  4. h.delete(k) if v.respond_to?('empty?') and v.empty?
  5. end
  6. end
  7. end
Add Comment
Please, Sign In to add comment