Sha256: 79cbc98c4ea63617530abcde8693b4a0a38060e2f5cf8d94e8c831a0f586d5d6
Contents?: true
Size: 672 Bytes
Versions: 19
Compression:
Stored size: 672 Bytes
Contents
# frozen_string_literal: true require 'ruby-progressbar/outputs/null' module CMSScanner # 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 class ProgressBarNullOutput < ::ProgressBar::Outputs::Null # @retutn [ Array<String> ] def logs @logs ||= [] end # Override of parent method # @return [ Array<String> ] return the logs when no string provided def log(string = nil) return logs if string.nil? logs << string unless logs.include?(string) end end end
Version data entries
19 entries across 19 versions & 3 rubygems