module Lolcommits::Tranzlate::Lolspeak
Constants
- LOL_DICTIONARY
Adapted and expanded from github.com/rwtnorton/moar-lolspeak
Public Instance Methods
tranzlate(str)
click to toggle source
# File lib/lolcommits/tranzlate/lolspeak.rb, line 84 def tranzlate(str) lolstr = str.dup LOL_DICTIONARY.each do |english, lolspeak| lolstr.gsub!(english, lolspeak.sample) end lolstr << '! kthxbye!' if rand(10) == 2 lolstr.gsub!(/(\?|!|,|\.)+/, '!') lolstr.upcase end