Class: Ingenico::Direct::SDK::Logging::SensitiveValueObfuscator
- Inherits:
-
Object
- Object
- Ingenico::Direct::SDK::Logging::SensitiveValueObfuscator
- Defined in:
- lib/ingenico/direct/sdk/logging/logging_util.rb
Overview
Class responsible for obfuscating sensitive data.
Class Method Summary collapse
Instance Method Summary collapse
-
#obfuscate_value(value) ⇒ Object
An arbitrary number of ‘*’, or null/empty if the value is null/empty.
Class Method Details
.INSTANCE ⇒ Object
38 39 40 41 |
# File 'lib/ingenico/direct/sdk/logging/logging_util.rb', line 38 def self.INSTANCE # use lazy instantiation @@INSTANCE ||= SensitiveValueObfuscator.new end |
Instance Method Details
#obfuscate_value(value) ⇒ Object
Returns an arbitrary number of ‘*’, or null/empty if the value is null/empty.
44 45 46 |
# File 'lib/ingenico/direct/sdk/logging/logging_util.rb', line 44 def obfuscate_value(value) value.nil? or value.empty? ? value : "***" end |