Class: Uniword::Redact::Pattern
- Inherits:
-
Object
- Object
- Uniword::Redact::Pattern
- Defined in:
- lib/uniword/redact/pattern.rb
Overview
One redaction pattern: a regex plus a label that classifies the kind of PII it matches.
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#regex ⇒ Object
readonly
Returns the value of attribute regex.
-
#replacement ⇒ Object
readonly
Returns the value of attribute replacement.
Instance Method Summary collapse
-
#initialize(name:, regex:, replacement: "[REDACTED]", description: nil) ⇒ Pattern
constructor
A new instance of Pattern.
Constructor Details
#initialize(name:, regex:, replacement: "[REDACTED]", description: nil) ⇒ Pattern
Returns a new instance of Pattern.
14 15 16 17 18 19 20 |
# File 'lib/uniword/redact/pattern.rb', line 14 def initialize(name:, regex:, replacement: "[REDACTED]", description: nil) @name = name @regex = regex @replacement = replacement @description = description end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
8 9 10 |
# File 'lib/uniword/redact/pattern.rb', line 8 def description @description end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
8 9 10 |
# File 'lib/uniword/redact/pattern.rb', line 8 def name @name end |
#regex ⇒ Object (readonly)
Returns the value of attribute regex.
8 9 10 |
# File 'lib/uniword/redact/pattern.rb', line 8 def regex @regex end |
#replacement ⇒ Object (readonly)
Returns the value of attribute replacement.
8 9 10 |
# File 'lib/uniword/redact/pattern.rb', line 8 def replacement @replacement end |