Class: Inventory::Rake::Tasks::Clean
- Inherits:
-
Object
- Object
- Inventory::Rake::Tasks::Clean
- Extended by:
- Rake::DSL
- Includes:
- Rake::DSL
- Defined in:
- lib/inventory/rake/tasks/clean.rb
Instance Attribute Summary collapse
-
#files ⇒ Object
Returns the value of attribute files.
-
#name ⇒ Object
Returns the value of attribute name.
Class Method Summary collapse
Instance Method Summary collapse
- #define ⇒ Object
-
#initialize(name, files = []) ⇒ Clean
constructor
A new instance of Clean.
Constructor Details
#initialize(name, files = []) ⇒ Clean
Returns a new instance of Clean.
23 24 25 26 |
# File 'lib/inventory/rake/tasks/clean.rb', line 23 def initialize(name, files = []) @name, @files = name, files define end |
Instance Attribute Details
#files ⇒ Object
Returns the value of attribute files.
34 35 36 |
# File 'lib/inventory/rake/tasks/clean.rb', line 34 def files @files end |
#name ⇒ Object
Returns the value of attribute name.
34 35 36 |
# File 'lib/inventory/rake/tasks/clean.rb', line 34 def name @name end |
Class Method Details
.define ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/inventory/rake/tasks/clean.rb', line 9 def define desc 'Delete targets built by rake that are often rebuilt' new :mostlyclean, Inventory::Rake::Tasks.mostlycleanfiles desc 'Delete targets built by rake' new :clean, Inventory::Rake::Tasks.cleanfiles task :clean => :mostlyclean desc 'Delete targets built by extconf.rb' new :distclean, Inventory::Rake::Tasks.distcleanfiles task :distclean => :clean end |
Instance Method Details
#define ⇒ Object
28 29 30 31 32 |
# File 'lib/inventory/rake/tasks/clean.rb', line 28 def define task name do rm files, :force => true end end |