class Object

Public Instance Methods

print_array(plural, single, array, indent) click to toggle source

Prints array with commas as needed

wrap(s, indent, width=78) click to toggle source

via www.java2s.com/Code/Ruby/String/WordwrappingLinesofText.htm

# File lib/bgg-hotness-cli/helpers.rb, line 3
def wrap(s, indent, width=78)
  s.gsub(/(.{1,#{width}})(\s+|\Z)/, "#{indent}\\1\n")
end