class CC::Workspace
Attributes
path_tree[R]
Public Class Methods
new(path_tree = PathTree.for_path("."))
click to toggle source
# File lib/cc/workspace.rb, line 6 def initialize(path_tree = PathTree.for_path(".")) @path_tree = path_tree end
Public Instance Methods
add(paths)
click to toggle source
# File lib/cc/workspace.rb, line 18 def add(paths) if paths.present? path_tree.include_paths(paths) end end
clone()
click to toggle source
# File lib/cc/workspace.rb, line 10 def clone self.class.new(path_tree.clone) end
paths()
click to toggle source
# File lib/cc/workspace.rb, line 14 def paths path_tree.all_paths end
remove(patterns)
click to toggle source
# File lib/cc/workspace.rb, line 24 def remove(patterns) Array(patterns).each do |pattern| exclusion = Exclusion.new(pattern) if exclusion.negated? path_tree.include_paths(exclusion.expand) else path_tree.exclude_paths(exclusion.expand) end end end