Module: Hoe::Clean
- Defined in:
- lib/hoe/clean.rb
Overview
Clean plugin for hoe.
Tasks Provided:
clean |
Clean up all the extras. |
Instance Attribute Summary (collapse)
-
- (Object) clean_globs
Optional: An array of file patterns to delete on clean.
Instance Method Summary (collapse)
-
- (Object) define_clean_tasks
Define tasks for plugin.
-
- (Object) initialize_clean
Initialize variables for plugin.
Instance Attribute Details
- (Object) clean_globs
Optional: An array of file patterns to delete on clean.
12 13 14 |
# File 'lib/hoe/clean.rb', line 12 def clean_globs @clean_globs end |
Instance Method Details
- (Object) define_clean_tasks
Define tasks for plugin.
25 26 27 28 29 30 31 32 33 |
# File 'lib/hoe/clean.rb', line 25 def define_clean_tasks desc 'Clean up all the extras.' task :clean => [ :clobber_docs, :clobber_package ] do clean_globs.each do |pattern| files = Dir[pattern] rm_rf files, :verbose => true unless files.empty? end end end |
- (Object) initialize_clean
Initialize variables for plugin.
17 18 19 20 |
# File 'lib/hoe/clean.rb', line 17 def initialize_clean self.clean_globs ||= %w(diff diff.txt TAGS ri deps .source_index *.gem **/*~ **/.*~ **/*.rbc coverage*) end |