Class: Hash
Instance Method Summary collapse
-
#compact ⇒ Object
Remove nil and empty keys.
Instance Method Details
#compact ⇒ Object
Remove nil and empty keys.
4 5 6 |
# File 'lib/typus/hash.rb', line 4 def compact delete_if { |key, value| value.nil? || value.empty? } end |