Class: HealthInspector::Inspector

Inherits:
Object
  • Object
show all
Defined in:
lib/health_inspector/inspector.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Inspector

Returns a new instance of Inspector.



7
8
9
10
11
12
# File 'lib/health_inspector/inspector.rb', line 7

def initialize(options)
  @context = Context.new( options[:repopath], options[:configpath] )
  @context.quiet_success = options[:'quiet-success']
  @context.no_color      = options[:'no-color']
  @context.configure
end

Class Method Details

.inspect(checklists, options) ⇒ Object



3
4
5
# File 'lib/health_inspector/inspector.rb', line 3

def self.inspect(checklists, options)
  new(options).inspect( checklists )
end

Instance Method Details

#inspect(checklists) ⇒ Object



14
15
16
17
18
# File 'lib/health_inspector/inspector.rb', line 14

def inspect(checklists)
  checklists.each do |checklist|
    Checklists.const_get(checklist).run(@context) if Checklists.const_defined?(checklist)
  end
end