Class: Stratagem::Scanner
Instance Attribute Summary collapse
-
#results ⇒ Object
readonly
Returns the value of attribute results.
Instance Method Summary collapse
- #export ⇒ Object
-
#initialize(model) ⇒ Scanner
constructor
A new instance of Scanner.
- #log(msg) ⇒ Object
- #run ⇒ Object
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
#results ⇒ Object (readonly)
Returns the value of attribute results.
3 4 5 |
# File 'lib/stratagem/scanner.rb', line 3 def results @results end |
Instance Method Details
#export ⇒ Object
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 |
#run ⇒ Object
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 |