Class: Ingenico::Connect::SDK::Logging::HeaderObfuscator Deprecated
- Inherits:
-
Obfuscator
- Object
- Obfuscator
- Ingenico::Connect::SDK::Logging::HeaderObfuscator
- Defined in:
- lib/ingenico/connect/sdk/logging/logging_util.rb
Overview
Deprecated.
This class shouldn’t have been exposed
Class that obfuscates headers of a message
Defined Under Namespace
Classes: Builder
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(obfuscators) ⇒ HeaderObfuscator
constructor
A new instance of HeaderObfuscator.
- #obfuscate_value(key, value) ⇒ Object
Constructor Details
#initialize(obfuscators) ⇒ HeaderObfuscator
Returns a new instance of HeaderObfuscator.
166 167 168 169 170 171 |
# File 'lib/ingenico/connect/sdk/logging/logging_util.rb', line 166 def initialize(obfuscators) # case insensitive super(obfuscators, true) obfuscation_rules = obfuscators.map { |key, value| [key, ->(v) { value.obfuscate_value(v) }]} @obfuscator = Obfuscation::HeaderObfuscator.new(obfuscation_rules) end |
Class Method Details
.builder ⇒ Object
177 178 179 |
# File 'lib/ingenico/connect/sdk/logging/logging_util.rb', line 177 def self.builder Builder.new end |
Instance Method Details
#obfuscate_value(key, value) ⇒ Object
173 174 175 |
# File 'lib/ingenico/connect/sdk/logging/logging_util.rb', line 173 def obfuscate_value(key, value) @obfuscator.obfuscate_header(key, value) end |