class Formatter
Public Class Methods
urlwrap(text, width=80)
click to toggle source
# File lib/berklee_valencia/formatter.rb, line 6 def self.urlwrap(text, width=80) text.gsub(/(.{1,#{width}})/, "\\1\n") end
wrap(text, width=80)
click to toggle source
# File lib/berklee_valencia/formatter.rb, line 2 def self.wrap(text, width=80) text.gsub(/(.{1,#{width}})(\s+|\Z)/, "\\1\n") end