Module: Normatron::Filters::AsciiFilter
- Defined in:
- lib/normatron/filters/ascii_filter.rb
Overview
Converts Unicode(and accented ASCII) characters to their plain-text ASCII equivalents.
Class Method Summary collapse
-
.call(input) ⇒ String
Performs input conversion according to filter requirements.
Class Method Details
.call(input) ⇒ String
Performs input conversion according to filter requirements.
This method returns the object itself when the first argument is not a String.
27 28 29 |
# File 'lib/normatron/filters/ascii_filter.rb', line 27 def self.call(input) input.kind_of?(String) ? Stringex::Unidecoder.decode(input) : input end |