class I18n::Backend::Transliterator::ProcTransliterator - i18n-0.6.11 Documentation

# class I18n::Backend::Transliterator::ProcTransliterator

A transliterator which accepts a Proc as its transliteration rule.

### Public Class Methods

new(rule) click to toggle source

    # File lib/i18n/backend/transliterator.rb, line 28
    def initialize(rule)
      @rule = rule
    end

### Public Instance Methods

transliterate(string, replacement = nil) click to toggle source

    # File lib/i18n/backend/transliterator.rb, line 32
    def transliterate(string, replacement = nil)
      @rule.call(string)
    end