Class: Chef::Knife::HelperList

Inherits:
Chef::Knife show all
Defined in:
lib/chef/knife/helper_list.rb

Instance Method Summary collapse

Instance Method Details

#runObject



24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/chef/knife/helper_list.rb', line 24

def run
  conf = ::Knife::Helper::Config.new(config[:file])
  ::Knife::Helper::Commands.new(
    conf.settings['command_base'],
    conf.commands,
    conf.option_sets
  ).commands.each do |c|
    if config[:all]
      output(ui.presenter.format_for_display(c))
    else
      output c['name']
    end
  end
end