Class: PragmaticSegmenter::Text
- Inherits:
-
String
- Object
- String
- PragmaticSegmenter::Text
- Defined in:
- lib/pragmatic_segmenter/types.rb
Instance Method Summary collapse
Instance Method Details
#apply(*rules) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/pragmatic_segmenter/types.rb', line 7 def apply(*rules) rules.flatten.each do |rule| self.gsub!(rule.pattern, rule.replacement) end self end |