add Rscons.clear() class method

This commit is contained in:
josh committed 2013-09-17 21:48:50 -04:00
1 parent 983cb7cf21
commit 770a22250a
3 files changed
+25

No files matched your search

+9
View File
@@ -22,4 +22,13 @@ module Rscons
class BuildError < Exception
end
# Remove all generated files
def self.clean
cache = Cache.new
cache.targets.each do |target|
FileUtils.rm_f(target)
end
Cache.clear
end
end
+5
View File
@@ -132,6 +132,11 @@ module Rscons
}
end
# Return a list of targets that have been built
def targets
@cache[:targets].keys
end
# Private Instance Methods
private