Module: InciScore::Normalizer::Rules::Sanitizer
Constant Summary collapse
- INVALID_CHARS =
/[^\/\[\]\(\)\w\s-]/
Instance Method Summary collapse
Instance Method Details
#call(src) ⇒ Object
73 74 75 76 77 |
# File 'lib/inci_score/normalizer_rules.rb', line 73 def call(src) Array(src).map do |token| token.gsub(INVALID_CHARS, '') end.reject(&:empty?) end |