Sha256: 3db3c823d8a5a9340ea3819f0a4c4715211e482b987461a209e9adc9dc9a39d5
Contents?: true
Size: 405 Bytes
Versions: 51
Compression:
Stored size: 405 Bytes
Contents
# encoding: utf-8 class String # convert windows path to cygwin path # # ==== Examples # # 'C:\hoge\hoge.txt'.winpath_to_cygwinpath # => '/cygdrive/c/hoge/hoge.txt' # def winpath_to_cygwinpath return self unless match(/\w:\\/) drive = scan(/(\w):\\/).first.first.downcase dir_file = scan(/\w:\\(.*)/).first.first.gsub('\\', '/') "/cygdrive/#{drive}/#{dir_file}" end end
Version data entries
51 entries across 51 versions & 1 rubygems