Class: KnifePlugins::Config

Inherits:
Chef::Knife
  • Object
show all
Defined in:
lib/chef/knife/config.rb

Instance Method Summary collapse

Instance Method Details

#present_options(data) ⇒ Object



36
37
38
39
40
41
42
# File 'lib/chef/knife/config.rb', line 36

def present_options(data)
  h = {}
  data.each do |c|
    h[c] = Chef::Config[c.to_sym]
  end
  h
end

#runObject



31
32
33
34
# File 'lib/chef/knife/config.rb', line 31

def run
  config_options = config[:show_all] ? Chef::Config.keys : @name_args
  ui.output format_for_display(present_options(config_options))
end