class StringIrc

Constants

BOLD
CLEAR
COLOR_CODE
COLOR_TABLE
INVERSE
ORIGINAL_COLOR_SCHEME
UNDERLINE

Public Class Methods

new(string = nil) click to toggle source
# File lib/string-irc.rb, line 34
def initialize(string = nil)
  @string = string
end

Public Instance Methods

bold() click to toggle source
# File lib/string-irc.rb, line 73
def bold
  add_code_l BOLD
end
inverse() click to toggle source
# File lib/string-irc.rb, line 81
def inverse
  add_code_l INVERSE
end
stringfy() click to toggle source
# File lib/string-irc.rb, line 85
def stringfy
  "#{@string}#{CLEAR}"
end
Also aliased as: to_s
to_s()
Alias for: stringfy
underline() click to toggle source
# File lib/string-irc.rb, line 77
def underline
  add_code_l UNDERLINE
end

Private Instance Methods

add_code_l(code) click to toggle source
# File lib/string-irc.rb, line 92
def add_code_l(code)
  @string = "#{code}#{@string}"
  self
end