lib/txtspk.rb in txtspk-0.0.2 vs lib/txtspk.rb in txtspk-0.0.3
- old
+ new
@@ -1,13 +1,21 @@
require "txtspk/version"
-class String
- def to_txtspk
- Txtspk::convert(self)
+module Txtspk
+ module CoreExtensions
+ module String
+ def to_txtspk
+ Txtspk::convert(self)
+ end
+ end
end
end
+class String
+ include Txtspk::CoreExtensions::String
+end
+
module Txtspk
CONTRACTIONS = {
'\1n\'t' => ['(are|can|could|did|does|do|had|ought|has|should|have|is|were|might|must|will|would) not', '(can)not', '(sha)ll not'],
'\1\'d' => ['(it|i|she|he|who|they|we|you) (had|would)'],
@@ -459,11 +467,10 @@
'JT' => ['Just Teasing'],
'JW' => ['Just wondering (Wondered)'],
'JYYC' => ['Just yanking your chain'],
'K' => ['okay'],
'KBD' => ['Keyboard'],
- 'KEWL' => ['Cool'],
'KFY' => ['Kiss for you'],
'KHUF' => ['Know How You Feel'],
'KIR' => ['Keep It Real'],
'KISS' => ['Keep It Simple, Stupid'],
'KIT' => ['Keep in touch'],
@@ -902,10 +909,10 @@
'YSYD' => ['Yeah, sure you do'],
'YTTT' => ['You telling the truth?'],
'YW' => ['You are Welcome'],
'YYSSW' => ['yeah yeah sure sure whatever'],
'ZZZ' => ['Sleeping, Bored, Tired']
-
+
}
def self.convert(str)
str = transform(str, CONTRACTIONS)
str = transform(str, ABBREVIATIONS)