Sha256: 5f0dc069af664d93bfdb3965fa8020f0b49b1972d5f94739303b8d19b25e1ec2
Contents?: true
Size: 305 Bytes
Versions: 2
Compression:
Stored size: 305 Bytes
Contents
module Pedantic::Txt def self.included(base) base.processors :replace_txt_words end def replace_txt_words(string) { /\btn?x\b/i => 'thanks', /\bthnks\b/i => 'thanks' }.each { |pattern, replacement| string.gsub!(pattern, replacement) } string end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
pedantic-0.1.1 | lib/pedantic/txt.rb |
pedantic-0.1.0 | lib/pedantic/txt.rb |