Class: IuguLogger::Pii::Scanner
- Inherits:
-
Object
- Object
- IuguLogger::Pii::Scanner
- Defined in:
- lib/iugu_logger/pii.rb
Overview
Stateful per-scan orchestrator (Layer 1 + Layer 2). NOT thread-safe —create a new Scanner per log event.
Instance Method Summary collapse
-
#initialize(strategies: DEFAULT_STRATEGIES, param_blocklist: DEFAULT_PARAM_BLOCKLIST) ⇒ Scanner
constructor
A new instance of Scanner.
-
#scan(payload) ⇒ Object
Returns a Result with a sanitized deep copy of the payload + detection metadata.
Constructor Details
#initialize(strategies: DEFAULT_STRATEGIES, param_blocklist: DEFAULT_PARAM_BLOCKLIST) ⇒ Scanner
Returns a new instance of Scanner.
156 157 158 159 160 161 |
# File 'lib/iugu_logger/pii.rb', line 156 def initialize(strategies: DEFAULT_STRATEGIES, param_blocklist: DEFAULT_PARAM_BLOCKLIST) @strategies = strategies @param_blocklist = param_blocklist.map { |k| k.to_s.downcase } @detected = [] @redacted_count = 0 end |