module CC::CLI::Output

Public Instance Methods

colorize(string, *args) click to toggle source
# File lib/cc/cli/output.rb, line 21
def colorize(string, *args)
  rainbow.wrap(string).color(*args)
end
fatal(message) click to toggle source
# File lib/cc/cli/output.rb, line 16
def fatal(message)
  $stderr.puts colorize(message, :red)
  exit 1
end
rainbow() click to toggle source
# File lib/cc/cli/output.rb, line 25
def rainbow
  @rainbow ||= Rainbow.new
end
say(message) click to toggle source
# File lib/cc/cli/output.rb, line 8
def say(message)
  terminal.say message
end
success(message) click to toggle source
# File lib/cc/cli/output.rb, line 4
def success(message)
  terminal.say colorize(message, :green)
end
terminal() click to toggle source
# File lib/cc/cli/output.rb, line 29
def terminal
  @terminal ||= HighLine.new($stdin, $stdout)
end
warn(message) click to toggle source
# File lib/cc/cli/output.rb, line 12
def warn(message)
  terminal.say colorize("WARNING: #{message}", :yellow)
end