lib/docrb/spec/fixtures/logrb.rb
def color(color, text)
    bg = BACKGROUNDS[color]
    reset_bg = ""
    if bg
      bg = "\e[#{bg}m"
      reset_bg = "\e[49m"
    end
    "#{bg}\e[#{COLORS[color]}m#{text}\e[#{COLORS[:reset]}m#{reset_bg}"
  end
# Internal: Formats a given text using the ANSI escape sequences. Notice
# that this method does not attempt to determine whether the current output
# supports escape sequences.
Formats a given text using the ANSI escape sequences. Notice
that this method does not attempt to determine whether the current output
supports escape sequences.
Formats a given text using the ANSI escape sequences . Notice that this method does not attempt to determine whether the current output supports escape sequences .
def color(color, text)
    bg = BACKGROUNDS[color]
    reset_bg = ""
    if bg
      bg = "\e[#{bg}m"
      reset_bg = "\e[49m"
    end
    "#{bg}\e[#{COLORS[color]}m#{text}\e[#{COLORS[:reset]}m#{reset_bg}"
  end
def color ( color , text ) bg = BACKGROUNDS [ color ] reset_bg = "" if bg bg = "\e[#{bg}m" reset_bg = "\e[49m" end "#{bg}\e[#{COLORS[color]}m#{text}\e[#{COLORS[:reset]}m#{reset_bg}" end
Internal: Formats a given text using the ANSI escape sequences.
Internal : Formats a given text using the ANSI escape sequences .
color
text