Sha256: 83c1d4f0130455b27fc65e3a43ae13dccf8c9e2ee018a642940f0d8f52f8c825
Contents?: true
Size: 276 Bytes
Versions: 3
Compression:
Stored size: 276 Bytes
Contents
# encoding: utf-8 module ActiveCleaner class StringCleaner < BaseCleaner def clean_value(old_value, record=nil) unless old_value.nil? value = old_value.dup value.strip! value.gsub!(/\s+/, " ") value end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
activecleaner-0.3.0 | lib/active_cleaner/string_cleaner.rb |
activecleaner-0.2.0 | lib/active_cleaner/string_cleaner.rb |
activecleaner-0.1.0 | lib/active_cleaner/string_cleaner.rb |