Class: Ingenico::Direct::SDK::Logging::Obfuscator::Builder
- Inherits:
-
Object
- Object
- Ingenico::Direct::SDK::Logging::Obfuscator::Builder
- Defined in:
- lib/ingenico/direct/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.
100 101 102 |
# File 'lib/ingenico/direct/sdk/logging/logging_util.rb', line 100 def initialize raise NotImplementedError, "#{self.class.name} is not implemented." end |
Instance Attribute Details
#obfuscators ⇒ Object
Returns the value of attribute obfuscators.
98 99 100 |
# File 'lib/ingenico/direct/sdk/logging/logging_util.rb', line 98 def obfuscators @obfuscators end |
Instance Method Details
#build ⇒ Object
114 115 116 |
# File 'lib/ingenico/direct/sdk/logging/logging_util.rb', line 114 def build raise NotImplementedError, "#{self.class.name}#build() is not implemented." end |
#with_field(key) ⇒ Object
104 105 106 107 |
# File 'lib/ingenico/direct/sdk/logging/logging_util.rb', line 104 def with_field(key) @obfuscators[key] = ValueObfuscator.INSTANCE self end |
#with_sensitive_field(key) ⇒ Object
109 110 111 112 |
# File 'lib/ingenico/direct/sdk/logging/logging_util.rb', line 109 def with_sensitive_field(key) @obfuscators[key] = SensitiveValueObfuscator.INSTANCE self end |