Module: Vagrant::Util::LineEndingHelpers

Defined in:
lib/vagrant/util/line_ending_helpers.rb

Instance Method Summary collapse

Instance Method Details

#dos_to_unix(string) ⇒ String

Converts line endings to unix-style line endings in the given string.

Parameters:

  • string (String)

    Original string

Returns:

  • (String)

    The fixed string



9
10
11
# File 'lib/vagrant/util/line_ending_helpers.rb', line 9

def dos_to_unix(string)
  string.gsub("\r\n", "\n")
end