Parent

Methods

Class/Module Index [+]

Quicksearch

String

Public Instance Methods

wrap(wrap_length=80, char="\n") click to toggle source

Wrap string by the given length, and join it with the given character. The method doesn't distinguish between words, it will only work based on the length.

# File lib/rhc/core_ext.rb, line 32
def wrap(wrap_length=80, char="\n")
  scan(/.{#{wrap_length}}|.+/).join(char)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.