class Omnibus::Cleaner

Public Class Methods

new(*) click to toggle source
Calls superclass method
# File lib/omnibus/cleaner.rb, line 36
def initialize(*)
  super
  @project = Project.load(name)
end

Public Instance Methods

clean_build_dir() click to toggle source
# File lib/omnibus/cleaner.rb, line 45
def clean_build_dir
  FileSyncer.glob("#{Config.build_dir}/**/*").each(&method(:remove_file))
end
clean_cache_dir() click to toggle source
# File lib/omnibus/cleaner.rb, line 55
def clean_cache_dir
  return unless purge?

  FileSyncer.glob("#{Config.cache_dir}/**/*").each(&method(:remove_file))
end
clean_install_dir() click to toggle source
# File lib/omnibus/cleaner.rb, line 61
def clean_install_dir
  return unless purge?

  remove_file(@project.install_dir)
end
clean_package_dir() click to toggle source
# File lib/omnibus/cleaner.rb, line 49
def clean_package_dir
  return unless purge?

  FileSyncer.glob("#{Config.package_dir}/**/*").each(&method(:remove_file))
end
clean_source_dir() click to toggle source
# File lib/omnibus/cleaner.rb, line 41
def clean_source_dir
  FileSyncer.glob("#{Config.source_dir}/**/*").each(&method(:remove_file))
end

Private Instance Methods

purge?() click to toggle source
# File lib/omnibus/cleaner.rb, line 69
def purge?
  !!options[:purge]
end