Class: UNF::Normalizer
- Inherits:
-
Object
- Object
- UNF::Normalizer
- Includes:
- Singleton
- Defined in:
- lib/unf/normalizer.rb,
lib/unf/normalizer_jruby.rb
Overview
UTF-8 string normalizer class. Implementations may vary depending on the platform.
Class Method Summary collapse
-
.normalize(string, form) ⇒ Object
A shortcut for instance.normalize(string, form).
Instance Method Summary collapse
-
#initialize ⇒ Normalizer
constructor
A new instance of Normalizer.
- #normalize(string, normalization_form) ⇒ Object
Constructor Details
#initialize ⇒ Normalizer
Returns a new instance of Normalizer.
5 6 7 |
# File 'lib/unf/normalizer_jruby.rb', line 5 def initialize() @normalizer = java.text.Normalizer end |
Class Method Details
.normalize(string, form) ⇒ Object
A shortcut for instance.normalize(string, form).
24 25 26 |
# File 'lib/unf/normalizer.rb', line 24 def normalize(string, form) instance.normalize(string, form) end |
Instance Method Details
#normalize(string, normalization_form) ⇒ Object
9 10 11 |
# File 'lib/unf/normalizer_jruby.rb', line 9 def normalize(string, normalization_form) @normalizer.normalize(string, form(normalization_form)) end |