Class: RightSupport::Notifier::Blacklister::Base
- Defined in:
- lib/right_support/notifiers/blacklisters/base.rb
Overview
base class for a partial data blacklister.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#replacement_value ⇒ Object
readonly
Returns the value of attribute replacement_value.
Instance Method Summary collapse
-
#filter(data) ⇒ TrueClass
filters data by finding and replacing blacklisted key patterns with a replacement value.
-
#initialize(options) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(options) ⇒ Base
Returns a new instance of Base.
31 32 33 34 35 36 |
# File 'lib/right_support/notifiers/blacklisters/base.rb', line 31 def initialize() = { replacement_value: 'HIDDEN' }.merge() @replacement_value = [:replacement_value] end |
Instance Attribute Details
#replacement_value ⇒ Object (readonly)
Returns the value of attribute replacement_value.
26 27 28 |
# File 'lib/right_support/notifiers/blacklisters/base.rb', line 26 def replacement_value @replacement_value end |
Instance Method Details
#filter(data) ⇒ TrueClass
filters data by finding and replacing blacklisted key patterns with a replacement value.
44 45 46 |
# File 'lib/right_support/notifiers/blacklisters/base.rb', line 44 def filter(data) fail 'Must be overridden' end |