Module: Chef::Knife::Core::FormattingOptions

Included in:
NodeShow, Search, Status
Defined in:
lib/chef/knife/core/formatting_options.rb

Overview

This module may be included into a knife subcommand class to automatically add configuration options used by the StatusPresenter and NodePresenter.

Class Method Summary collapse

Class Method Details

.included(includer) ⇒ Object

Would prefer to do this in a rational way, but can’t be done b/c of Mixlib::CLI’s design :(



29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/chef/knife/core/formatting_options.rb', line 29

def self.included(includer)
  includer.class_eval do
    option :medium_output,
      short: "-m",
      long: "--medium",
      boolean: true,
      default: false,
      description: "Include normal attributes in the output"

    option :long_output,
      short: "-l",
      long: "--long",
      boolean: true,
      default: false,
      description: "Include all attributes in the output"
  end
end