Class: Stratagem::Scanner

Inherits:
Object show all
Defined in:
lib/stratagem/scanner.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(model) ⇒ Scanner

Returns a new instance of Scanner.



5
6
7
8
# File 'lib/stratagem/scanner.rb', line 5

def initialize(model)
  @model = model
  @results = []
end

Instance Attribute Details

#resultsObject (readonly)

Returns the value of attribute results.



3
4
5
# File 'lib/stratagem/scanner.rb', line 3

def results
  @results
end

Instance Method Details

#exportObject



22
23
24
# File 'lib/stratagem/scanner.rb', line 22

def export
  { :results => [] }
end

#log(msg) ⇒ Object



26
27
28
# File 'lib/stratagem/scanner.rb', line 26

def log(msg)
  Stratagem.logger.debug msg
end

#runObject



10
11
12
13
14
15
16
17
18
19
20
# File 'lib/stratagem/scanner.rb', line 10

def run
  # Object.sg_subclasses_of(Stratagem::Scan::Checks::Base).each {|check|
  #   log "running security check: #{check}"
  #   puts "running #{check}"
  #   check = check.new(@model)
  #   check.run
  #   @results += check.results
  #   log ""
  # }
  # self
end