Module: Olyx::Guardrails::Secrets::RedactionSpans
- Defined in:
- lib/olyx/guardrails/secrets/redaction_spans.rb
Overview
Normalizes and merges overlapping secret redaction offsets.
Class Method Summary collapse
Class Method Details
.call(findings) ⇒ Object
10 11 12 13 |
# File 'lib/olyx/guardrails/secrets/redaction_spans.rb', line 10 def call(findings) spans = findings.filter_map { |finding| span(finding) }.sort spans.each_with_object([]) { |candidate, merged| append(merged, candidate) } end |