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