class Chef::Knife::Inspect

Constants

CHECKLISTS

Public Instance Methods

run() click to toggle source
# File lib/chef/knife/inspect.rb, line 21
def run
  results = checklists_to_run.map do |checklist|
    ::HealthInspector::Checklists.const_get(checklist).run(self)
  end

  exit !results.include?(false)
end

Private Instance Methods

checklists_to_run() click to toggle source
# File lib/chef/knife/inspect.rb, line 31
def checklists_to_run
  CHECKLISTS.select do |checklist|
    checklist = ::HealthInspector::Checklists.const_get(checklist)

    config[checklist.option]
  end
end