Class: PromptSanitizer::Audit::AuditEvent
- Inherits:
-
Struct
- Object
- Struct
- PromptSanitizer::Audit::AuditEvent
- Defined in:
- lib/prompt_sanitizer/audit/base.rb
Overview
Immutable value object representing a single PII-detection event.
The original PII text is never stored — only a 16-char SHA-256 prefix hash, making the log itself safe to persist or export for compliance.
Instance Attribute Summary collapse
-
#confidence ⇒ Object
Returns the value of attribute confidence.
-
#entity_type ⇒ Object
Returns the value of attribute entity_type.
-
#layer ⇒ Object
Returns the value of attribute layer.
-
#redaction_method ⇒ Object
Returns the value of attribute redaction_method.
-
#session_id ⇒ Object
Returns the value of attribute session_id.
-
#text_hash ⇒ Object
Returns the value of attribute text_hash.
-
#timestamp ⇒ Object
Returns the value of attribute timestamp.
Instance Method Summary collapse
Instance Attribute Details
#confidence ⇒ Object
Returns the value of attribute confidence
13 14 15 |
# File 'lib/prompt_sanitizer/audit/base.rb', line 13 def confidence @confidence end |
#entity_type ⇒ Object
Returns the value of attribute entity_type
13 14 15 |
# File 'lib/prompt_sanitizer/audit/base.rb', line 13 def entity_type @entity_type end |
#layer ⇒ Object
Returns the value of attribute layer
13 14 15 |
# File 'lib/prompt_sanitizer/audit/base.rb', line 13 def layer @layer end |
#redaction_method ⇒ Object
Returns the value of attribute redaction_method
13 14 15 |
# File 'lib/prompt_sanitizer/audit/base.rb', line 13 def redaction_method @redaction_method end |
#session_id ⇒ Object
Returns the value of attribute session_id
13 14 15 |
# File 'lib/prompt_sanitizer/audit/base.rb', line 13 def session_id @session_id end |
#text_hash ⇒ Object
Returns the value of attribute text_hash
13 14 15 |
# File 'lib/prompt_sanitizer/audit/base.rb', line 13 def text_hash @text_hash end |
#timestamp ⇒ Object
Returns the value of attribute timestamp
13 14 15 |
# File 'lib/prompt_sanitizer/audit/base.rb', line 13 def end |
Instance Method Details
#to_h ⇒ Object
23 24 25 |
# File 'lib/prompt_sanitizer/audit/base.rb', line 23 def to_h super.transform_keys(&:to_s) end |