Class: OnlinePayments::SDK::Logging::Obfuscator::Builder
- Inherits:
-
Object
- Object
- OnlinePayments::SDK::Logging::Obfuscator::Builder
- Defined in:
- lib/onlinepayments/sdk/logging/logging_util.rb
Overview
A convenient wrapper to build obfuscators
Direct Known Subclasses
Instance Attribute Summary collapse
-
#obfuscators ⇒ Object
Returns the value of attribute obfuscators.
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize ⇒ Builder
constructor
A new instance of Builder.
- #with_field(key) ⇒ Object
- #with_sensitive_field(key) ⇒ Object
Constructor Details
#initialize ⇒ Builder
Returns a new instance of Builder.
107 108 109 |
# File 'lib/onlinepayments/sdk/logging/logging_util.rb', line 107 def initialize raise NotImplementedError, "#{self.class.name} is not implemented." end |
Instance Attribute Details
#obfuscators ⇒ Object
Returns the value of attribute obfuscators.
105 106 107 |
# File 'lib/onlinepayments/sdk/logging/logging_util.rb', line 105 def obfuscators @obfuscators end |
Instance Method Details
#build ⇒ Object
121 122 123 |
# File 'lib/onlinepayments/sdk/logging/logging_util.rb', line 121 def build raise NotImplementedError, "#{self.class.name}#build() is not implemented." end |
#with_field(key) ⇒ Object
111 112 113 114 |
# File 'lib/onlinepayments/sdk/logging/logging_util.rb', line 111 def with_field(key) @obfuscators[key] = ValueObfuscator.INSTANCE self end |
#with_sensitive_field(key) ⇒ Object
116 117 118 119 |
# File 'lib/onlinepayments/sdk/logging/logging_util.rb', line 116 def with_sensitive_field(key) @obfuscators[key] = SensitiveValueObfuscator.INSTANCE self end |