Sha256: d285b137d5287f967a8e9e542f891e262173fefaebdb7d7a83373551c80ed504
Contents?: true
Size: 387 Bytes
Versions: 2
Compression:
Stored size: 387 Bytes
Contents
# frozen_string_literal: true module Realize class Format # This transformer takes in a value and replaces any whitespace characters (\t\r\n\f\v) # with a blank space. class RemoveWhitespace acts_as_hashable def initialize(_opts = {}); end def transform(_resolver, value, _time, _record) value.to_s.gsub(/\s+/, ' ') end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
realize-1.0.0.pre.alpha.1 | lib/realize/format/remove_whitespace.rb |
realize-1.0.0.pre.alpha | lib/realize/format/remove_whitespace.rb |