vagrant/lib/vagrant/util/line_ending_helpers.rb

15 lines
333 B
Ruby

module Vagrant
module Util
module LineEndingHelpers
# Converts line endings to unix-style line endings in the
# given string.
#
# @param [String] string Original string
# @return [String] The fixed string
def dos_to_unix(string)
string.gsub("\r\n", "\n")
end
end
end
end