Class: CMSScanner::ProgressBarNullOutput
- Inherits:
-
ProgressBar::Outputs::Null
- Object
- ProgressBar::Outputs::Null
- CMSScanner::ProgressBarNullOutput
- Defined in:
- lib/cms_scanner/progressbar_null_output.rb
Overview
Adds the feature to log message sent to #log So they can be retrieved at some point, like after a password attack with a JSON output which won’t display the progressbar but still call #log for errors etc
Instance Method Summary collapse
-
#log(string = nil) ⇒ Array<String>
Override of parent method.
- #logs ⇒ Object
Instance Method Details
#log(string = nil) ⇒ Array<String>
Override of parent method
17 18 19 20 21 |
# File 'lib/cms_scanner/progressbar_null_output.rb', line 17 def log(string = nil) return logs if string.nil? logs << string unless logs.include?(string) end |
#logs ⇒ Object
11 12 13 |
# File 'lib/cms_scanner/progressbar_null_output.rb', line 11 def logs @logs ||= [] end |