Method: TTY::Shell#warn

Defined in:
lib/tty/shell.rb

#warn(*args) ⇒ Array

Print statement(s) out in yellow color.

Examples:

shell.warn "This action can have dire consequences"
shell.warn "Carefull young apprentice", "This is potentially dangerous"

Parameters:

  • messages (Array)

Returns:

  • (Array)

    messages



117
118
119
120
# File 'lib/tty/shell.rb', line 117

def warn(*args)
  options = Utils.extract_options!(args)
  args.each { |message| say message, options.merge(color: :yellow) }
end