Class: Array
Overview
Extension class for Array
Instance Method Summary collapse
-
#cleanup ⇒ Object
Removes all empty entries.
-
#recursive_cleanup ⇒ Object
Removes all empty entries recursively in the array and each Hash in it.
Instance Method Details
#cleanup ⇒ Object
Removes all empty entries
6 7 8 |
# File 'lib/libis/tools/extend/array.rb', line 6 def cleanup self.delete_if { |v| v.nil? || (v.respond_to?(:empty?) ? v.empty? : false) } end |