Module: DeleteDerivedData

Defined in:
lib/delete_derived_data.rb,
lib/delete_derived_data/trash.rb,
lib/delete_derived_data/utils.rb,
lib/delete_derived_data/delete.rb,
lib/delete_derived_data/search.rb,
lib/delete_derived_data/version.rb

Defined Under Namespace

Classes: Delete, Filesize, Search, Trash

Constant Summary collapse

VERSION =
"0.0.2".freeze

Class Method Summary collapse

Class Method Details

.delete(options = {}) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/delete_derived_data.rb', line 7

def self.delete(options = {})
  search = Search.new(options)
  derived_paths = search.getDerivedDatas
  archives_paths = search.getArchives if options[:archives]

  if !derived_paths.nil? && derived_paths.length > 0
    Delete.run(derived_paths, options)
  end

  if !archives_paths.nil? && archives_paths.length > 0
    Delete.run(archives_paths, options)
  end
end