Class Chef::Knife::UI
In: lib/chef/knife/core/ui.rb
Parent: Object

Chef::Knife::UI

 The User Interaction class used by knife.

Methods

ask   ask_question   color   color?   confirm   edit_data   edit_object   error   fatal   highline   info   interchange?   list   msg   new   output   pretty_print   use_presenter   warn  

Attributes

config  [R] 
stderr  [R] 
stdin  [R] 
stdout  [R] 

Public Class methods

Public Instance methods

Should colored output be used? For output to a terminal, this is determined by the value of `config[:color]`. When output is not to a terminal, colored output is never used

Print an error message

Print a message describing a fatal error.

info(message)

Alias for msg

Determines if the output format is a data interchange format, i.e., JSON or YAML

Prints a message to stdout. Aliased as info for compatibility with the logger API.

Formats data using the configured presenter and outputs the result via msg. Formatting can be customized by configuring a different presenter. See use_presenter

Creates a new presenter_class object and uses it to format structured data for display. By default, a Chef::Knife::Core::GenericPresenter object is used.

Print a warning message

[Validate]