Class: CMSScanner::Scan
- Inherits:
-
Object
- Object
- CMSScanner::Scan
- Defined in:
- lib/cms_scanner.rb
Overview
Scan
Instance Method Summary collapse
- #controllers ⇒ Controllers
- #datastore ⇒ Hash
-
#formatter ⇒ Object
Used for convenience.
-
#initialize {|_self| ... } ⇒ Scan
constructor
A new instance of Scan.
- #run ⇒ Object
Constructor Details
#initialize {|_self| ... } ⇒ Scan
Returns a new instance of Scan.
43 44 45 46 47 |
# File 'lib/cms_scanner.rb', line 43 def initialize controllers << NS::Controller::Core.new yield self if block_given? end |
Instance Method Details
#controllers ⇒ Controllers
50 51 52 |
# File 'lib/cms_scanner.rb', line 50 def controllers @controllers ||= NS::Controllers.new end |
#datastore ⇒ Hash
76 77 78 |
# File 'lib/cms_scanner.rb', line 76 def datastore controllers.first.datastore end |
#formatter ⇒ Object
Used for convenience
71 72 73 |
# File 'lib/cms_scanner.rb', line 71 def formatter controllers.first.formatter end |
#run ⇒ Object
54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/cms_scanner.rb', line 54 def run controllers.run rescue => e formatter.output('@scan_aborted', reason: e., trace: e.backtrace, verbose: controllers.first.[:verbose]) ensure # Ensures a clean abort of Hydra Browser.instance.hydra.abort Browser.instance.hydra.run formatter.beautify end |