Class: I18n::Backend::Transliterator::ProcTransliterator
- Defined in:
- lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/i18n-1.12.0/lib/i18n/backend/transliterator.rb
Overview
A transliterator which accepts a Proc as its transliteration rule.
Instance Method Summary collapse
-
#initialize(rule) ⇒ ProcTransliterator
constructor
A new instance of ProcTransliterator.
- #transliterate(string, replacement = nil) ⇒ Object
Constructor Details
#initialize(rule) ⇒ ProcTransliterator
Returns a new instance of ProcTransliterator.
31 32 33 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/i18n-1.12.0/lib/i18n/backend/transliterator.rb', line 31 def initialize(rule) @rule = rule end |
Instance Method Details
#transliterate(string, replacement = nil) ⇒ Object
35 36 37 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/i18n-1.12.0/lib/i18n/backend/transliterator.rb', line 35 def transliterate(string, replacement = nil) @rule.call(string) end |