Module: HealthInspector::Runner
- Included in:
- Chef::Knife::CookbookInspect, Chef::Knife::EnvironmentInspect, Chef::Knife::RoleInspect
- Defined in:
- lib/health_inspector/runner.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
3 4 5 |
# File 'lib/health_inspector/runner.rb', line 3 def self.included(base) base.extend(ClassMethods) end |
Instance Method Details
#run ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/health_inspector/runner.rb', line 17 def run case @name_args.length when 1 # We are inspecting an item item = @name_args[0] validator = self.class.checklist.new(self) item = validator.load_item item exit validator.validate_item item when 0 # We are inspecting all the items exit self.class.checklist.run(self) end end |