class Chef::Knife::HelperList

Public Instance Methods

run() click to toggle source
# 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