Module: AttributeNormalizer::Normalizers::BlankNormalizer

Defined in:
lib/attribute_normalizer/normalizers/blank_normalizer.rb

Class Method Summary collapse

Class Method Details

.normalize(value, options = {}) ⇒ Object


4
5
6
# File 'lib/attribute_normalizer/normalizers/blank_normalizer.rb', line 4

def self.normalize(value, options = {})
  value.nil? || (value.is_a?(String) && value !~ /\S/) ? nil : value
end