Class: OnlinePayments::SDK::Logging::Obfuscator
- Inherits:
-
Object
- Object
- OnlinePayments::SDK::Logging::Obfuscator
- Defined in:
- lib/onlinepayments/sdk/logging/logging_util.rb
Overview
end of SensitiveValueObfuscator
Direct Known Subclasses
Defined Under Namespace
Instance Method Summary collapse
-
#initialize(obfuscators, case_insensitive) ⇒ Obfuscator
constructor
A new instance of Obfuscator.
- #obfuscate_value(key, value) ⇒ Object
Constructor Details
#initialize(obfuscators, case_insensitive) ⇒ Obfuscator
Returns a new instance of Obfuscator.
55 56 57 58 |
# File 'lib/onlinepayments/sdk/logging/logging_util.rb', line 55 def initialize(obfuscators, case_insensitive) raise ArgumentError unless obfuscators.is_a? Hash @obfuscators = copy(obfuscators, case_insensitive) end |
Instance Method Details
#obfuscate_value(key, value) ⇒ Object
94 95 96 97 98 99 100 101 |
# File 'lib/onlinepayments/sdk/logging/logging_util.rb', line 94 def obfuscate_value(key, value) obfuscator = @obfuscators[key] if obfuscator.nil? value else obfuscator.obfuscate_value(value) end end |