Sha256: 5ce1bffa6b7cd26c639c2e96a6d675f71a30057a6e9924015d3c53e6661bcdbd
Contents?: true
Size: 391 Bytes
Versions: 10
Compression:
Stored size: 391 Bytes
Contents
module Pupa class Processor # Processor helper methods. module Helper # Normalizes all whitespace to spaces, removes consecutive spaces, and # strips leading and ending spaces. # # @param [String] a string # @return [String] a clean string def clean(string) string.gsub(/[[:space:]]/, ' ').squeeze(' ').strip end end end end
Version data entries
10 entries across 10 versions & 1 rubygems