Class: Omnibus::Cleaner
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- Omnibus::Cleaner
- Includes:
- Thor::Actions
- Defined in:
- lib/omnibus/cleaner.rb
Instance Method Summary collapse
- #clean_build_dir ⇒ Object
- #clean_cache_dir ⇒ Object
- #clean_install_dir ⇒ Object
- #clean_package_dir ⇒ Object
- #clean_source_dir ⇒ Object
-
#initialize ⇒ Cleaner
constructor
A new instance of Cleaner.
Constructor Details
Instance Method Details
#clean_build_dir ⇒ Object
45 46 47 |
# File 'lib/omnibus/cleaner.rb', line 45 def clean_build_dir FileSyncer.glob("#{Config.build_dir}/**/*").each(&method(:remove_file)) end |
#clean_cache_dir ⇒ Object
55 56 57 58 59 |
# 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 ⇒ Object
61 62 63 64 65 |
# File 'lib/omnibus/cleaner.rb', line 61 def clean_install_dir return unless purge? remove_file(@project.install_dir) end |
#clean_package_dir ⇒ Object
49 50 51 52 53 |
# 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 ⇒ Object
41 42 43 |
# File 'lib/omnibus/cleaner.rb', line 41 def clean_source_dir FileSyncer.glob("#{Config.source_dir}/**/*").each(&method(:remove_file)) end |