Sha256: d7329652a1c3393ba7ac17b9a4dd5d0bae0a30bd0b8f2b6ecc79c4251e6c2954
Contents?: true
Size: 294 Bytes
Versions: 10
Compression:
Stored size: 294 Bytes
Contents
class Dir # Is a path parental to another? # # Dir.parent?('parent', 'parent/child') #=> true # # TODO: Needs improvement. # # TODO: Instance version? def self.parent?(parent_path, child_path) %r|^#{Regexp.escape(parent_path)}| =~ child_path ? true : false end end
Version data entries
10 entries across 9 versions & 2 rubygems