Sha256: cd15a7985b4a549bab63763d9d1317bb92d8f68d238e12cee7e7c62a25ed6492
Contents?: true
Size: 281 Bytes
Versions: 20
Compression:
Stored size: 281 Bytes
Contents
class File # Return the head of path from the rest of the path. # # File.split_root('etc/xdg/gtk') #=> ['etc', 'xdg/gtk'] # def self.split_root(path) path_re = Regexp.new('[' + Regexp.escape(File::Separator + %q{\/}) + ']') path.split(path_re, 2) end end
Version data entries
20 entries across 19 versions & 2 rubygems