Sha256: feb8c91d44c3ab8e6a593c0ac7960253e2ef26e02ae8f5b169cb103b4525d2d7
Contents?: true
Size: 423 Bytes
Versions: 20
Compression:
Stored size: 423 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) if string string.gsub(/[[:space:]]/, ' ').squeeze(' ').strip end end end end end
Version data entries
20 entries across 20 versions & 1 rubygems