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
5 6 7 8 9 10 |
# File 'lib/pragmatic_segmenter/types.rb', line 5 def apply(*rules) rules.flatten.each do |rule| self.gsub!(rule.pattern, rule.replacement) end self end |