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



12
13
14
# File 'lib/vagrant/util/line_ending_helpers.rb', line 12

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