class Build::Files::List
A list of paths, where #each yields instances of Path.
def self.coerce(arg)
def self.coerce(arg) if arg.kind_of? self arg else Paths.new(arg) end end
def +(list)
def +(list) Composite.new([self, list]) end
def -(list)
def -(list) Difference.new(self, list) end
def ==(other)
def ==(other) if self.class == other.class self.eql?(other) elsif other.kind_of? self.class self.to_a.sort == other.to_a.sort else super end end
def create
def create each(&:create) end
def delete
def delete each(&:delete) end
def exist?
def exist? all?(&:exist?) end
def intersects? other
def intersects? other other.any?{|path| include?(path)} end
def map
def map Paths.new(super) end
def rebase(root)
def rebase(root) Paths.new(self.collect{|path| path.rebase(root)}, [root]) end
def roots
def roots collect{|path| path.root}.sort.uniq end
def to_paths
def to_paths Paths.new(each.to_a) end
def to_s
def to_s inspect end
def touch
def touch each(&:touch) end
def with(**args)
def with(**args) return to_enum(:with, **args) unless block_given? paths = [] each do |path| updated_path = path.with(args) yield path, updated_path paths << updated_path end return Paths.new(paths) end