Sha256: f5a7cd55fe6394a2e96c023641e52e1292bcbb5a4dbc2934d48b87ddbf1d63a3
Contents?: true
Size: 624 Bytes
Versions: 12
Compression:
Stored size: 624 Bytes
Contents
module CC class Workspace autoload :Exclusion, "cc/workspace/exclusion" autoload :PathTree, "cc/workspace/path_tree" def initialize(path_tree = PathTree.new(".")) @path_tree = path_tree end def clone self.class.new(path_tree.clone) end def paths path_tree.all_paths end def add(paths) if paths.present? path_tree.include_paths(paths) end end def remove(patterns) Array(patterns).each do |pattern| path_tree.exclude_paths(Exclusion.new(pattern).expand) end end private attr_reader :path_tree end end
Version data entries
12 entries across 12 versions & 1 rubygems