class Text::Reform::BreakWrap
Public Class Methods
new()
click to toggle source
# File lib/text/reform.rb, line 1502 def initialize end
Public Instance Methods
break(text, initial, total)
click to toggle source
Break by wrapping and slopping to the next line.
initial_max_length
-
The maximum size of the first part of the word that will remain on the first line.
total_width
-
The total width that can be appended to this first line.
# File lib/text/reform.rb, line 1511 def break(text, initial, total) if initial == total text =~ /\A(\s*\S*)(.*)/ return $1, $2 else return '', text end end