Sha256: a18f41491f2b4adc3750a4e7289b36e6d02ad0436a679dafc7c4c61929b51536
Contents?: true
Size: 629 Bytes
Versions: 32
Compression:
Stored size: 629 Bytes
Contents
module CC class Workspace autoload :Exclusion, "cc/workspace/exclusion" autoload :PathTree, "cc/workspace/path_tree" def initialize(path_tree = PathTree.for_path(".")) @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
32 entries across 32 versions & 1 rubygems