Class: Array

Inherits:
Object
  • Object
show all
Defined in:
lib/mumuki/classroom/models/concerns/extensions.rb

Instance Method Summary collapse

Instance Method Details

#deep_compactObject



56
57
58
59
60
61
62
63
64
# File 'lib/mumuki/classroom/models/concerns/extensions.rb', line 56

def deep_compact
  compact
  each do |e|
    if e.respond_to? :deep_compact
      e.deep_compact
    end
    self.delete(e) if e.nil?
  end
end