class Build::Files::Directory
def self.join(*args)
def self.join(*args) self.new(Path.join(*args)) end
def each
def each return to_enum(:each) unless block_given? Dir.glob(@path + "**/*") do |path| yield Path.new(path, @path.root) end end
def eql?(other)
def eql?(other) other.kind_of?(self.class) and @path.eql?(other.path) end
def hash
def hash @path.hash end
def include?(path)
def include?(path) # Would be true if path is a descendant of full_path. path.start_with?(@path) end
def initialize(path)
def initialize(path) @path = path end
def rebase(root)
def rebase(root) self.class.new(@path.rebase(root)) end
def root
def root @path.root end
def roots
def roots [root] end
def to_path
def to_path @path end
def to_str
def to_str @path.to_str end