add Rscons.clear() class method
This commit is contained in:
1 parent
983cb7cf21
commit
770a22250a
3 files changed
+25
No files matched your search
@@ -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
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user