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.
57 58 59 60 61 |
# File 'lib/cms_scanner.rb', line 57 def initialize controllers << NS::Controller::Core.new yield self if block_given? end |
Instance Method Details
#controllers ⇒ Controllers
64 65 66 |
# File 'lib/cms_scanner.rb', line 64 def controllers @controllers ||= NS::Controllers.new end |
#datastore ⇒ Hash
90 91 92 |
# File 'lib/cms_scanner.rb', line 90 def datastore controllers.first.datastore end |
#formatter ⇒ Object
Used for convenience
85 86 87 |
# File 'lib/cms_scanner.rb', line 85 def formatter controllers.first.formatter end |
#run ⇒ Object
68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/cms_scanner.rb', line 68 def run controllers.run rescue OptParseValidator::NoRequiredOption => e formatter.output('@usage', msg: e.) rescue => e formatter.output('@scan_aborted', reason: e., trace: e.backtrace, verbose: controllers.first.[:verbose]) ensure Browser.instance.hydra.abort formatter.beautify end |