Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/cinch/plugins/rainbow.rb

Overview

moved from libobj_extstring.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) irc_colorize



4
5
6
7
8
# File 'lib/cinch/plugins/rainbow.rb', line 4

def irc_colorize
  self.gsub(/!\[(.*?)\]/) { $1.tr('boruic', 2.chr + 15.chr + 18.chr + 31.chr + 29.chr + 3.chr) }
  #Note to self, tr and gsub is your friend!
  #Thanks to j416 on #ruby@freenode!
end