class Gem::Release::Context::Ui::Tty

def announce(msg, args = [], msgs = [])

def announce(msg, args = [], msgs = [])
  msg = format_msg(msg, args, msgs)
  puts colored(:green, with_spacing(msg, true))
end

def cmd(msg)

def cmd(msg)
  notice("$ #{msg}")
end

def colored(color, str)

def colored(color, str)
  opts[:color] ? super : str
end

def error(msg, args = [], msgs = [])

def error(msg, args = [], msgs = [])
  msg = format_msg(msg, args, msgs)
  puts colored(:red, with_spacing(msg, true))
end

def format_msg(msg, args, msgs)

def format_msg(msg, args, msgs)
  msg = msgs[msg] % args if msg.is_a?(Symbol)
  msg.strip
end

def info(msg, args = [], msgs = [])

def info(msg, args = [], msgs = [])
  msg = format_msg(msg, args, msgs)
  puts colored(:blue, with_spacing(msg, true))
end

def notice(msg, args = [], msgs = [])

def notice(msg, args = [], msgs = [])
  msg = format_msg(msg, args, msgs)
  puts colored(:gray, with_spacing(msg, false))
end

def success(msg)

def success(msg)
  announce(msg)
  puts
end

def warn(msg, args = [], msgs = [])

def warn(msg, args = [], msgs = [])
  msg = format_msg(msg, args, msgs)
  puts colored(:yellow, with_spacing(msg, false))
end

def with_spacing(str, space)

def with_spacing(str, space)
  str = "\n#{str}" if space && !@last
  @last = space
  str
end