Sha256: d1746993351bfda3151760623feed051b8c24f16ae8aad6a8f3cbf57e80a550d

Contents?: true

Size: 424 Bytes

Versions: 50

Compression:

Stored size: 424 Bytes

Contents

module REXML
  module Formatters
    class Pretty < Default
      private
      def wrap(string, width)
        # Recursivly wrap string at width.
        return string if string.length <= width
        place = string.rindex(/\s+/, width) # Position in string with last ' ' before cutoff
        return string if place.nil?
        return string[0,place] + "\n" + wrap(string[place+1..-1], width)
      end
    end
  end
end

Version data entries

50 entries across 50 versions & 3 rubygems

Version Path
schof-searchlogic-0.0.2 test/libs/rexml_fix.rb
searchgasm-0.9.5 test/libs/rexml_fix.rb
searchgasm-0.9.3 test/libs/rexml_fix.rb
searchgasm-0.9.0 test/libs/rexml_fix.rb
searchgasm-0.9.4 test/libs/rexml_fix.rb
searchgasm-0.9.1 test/libs/rexml_fix.rb
searchgasm-0.9.10 test/libs/rexml_fix.rb
searchgasm-0.9.2 test/libs/rexml_fix.rb
searchgasm-1.1.1 test/libs/rexml_fix.rb
searchgasm-1.0.1 test/libs/rexml_fix.rb
searchgasm-0.9.9 test/libs/rexml_fix.rb
searchgasm-1.0.4 test/libs/rexml_fix.rb
searchgasm-1.0.0 test/libs/rexml_fix.rb
searchgasm-1.1.0 test/libs/rexml_fix.rb
searchgasm-0.9.6 test/libs/rexml_fix.rb
searchgasm-0.9.8 test/libs/rexml_fix.rb
searchgasm-1.0.2 test/libs/rexml_fix.rb
searchgasm-1.0.3 test/libs/rexml_fix.rb
searchgasm-0.9.7 test/libs/rexml_fix.rb
searchgasm-1.2.2 test/libs/rexml_fix.rb