Class: TurkishRegexps::TrRegexp
- Inherits:
-
Object
- Object
- TurkishRegexps::TrRegexp
- Defined in:
- lib/turkish_regexps/tr_regexp.rb
Overview
Let your regexps to speak in Turkish
Instance Method Summary collapse
-
#initialize(pattern) ⇒ TrRegexp
constructor
A new instance of TrRegexp.
-
#translate ⇒ Regexp
Translate regexps into Turkish supported version.
Constructor Details
#initialize(pattern) ⇒ TrRegexp
A new instance of TrRegexp
10 11 12 13 14 |
# File 'lib/turkish_regexps/tr_regexp.rb', line 10 def initialize(pattern) @source = pattern.source @options = pattern. @casefold = pattern.casefold? end |
Instance Method Details
#translate ⇒ Regexp
Translate regexps into Turkish supported version
19 20 21 22 23 |
# File 'lib/turkish_regexps/tr_regexp.rb', line 19 def translate translate_matches set_encoding end |