method

word_wrap

ruby latest stable - Class: Bundler::UI::Shell

Method not available on this version

This method is only available on newer versions. The first available version (v2_6_3) is shown here.

word_wrap(text, line_width = @shell.terminal_width)
private

No documentation available.

# File lib/bundler/ui/shell.rb, line 131
      def word_wrap(text, line_width = @shell.terminal_width)
        strip_leading_spaces(text).split("\n").collect do |line|
          line.length > line_width ? line.gsub(/(.{1,#{line_width}})(\s+|$)/, "\\1\n").strip : line
        end * "\n"
      end