Class: OnlinePayments::SDK::Logging::SensitiveValueObfuscator
- Inherits:
-
Object
- Object
- OnlinePayments::SDK::Logging::SensitiveValueObfuscator
- Defined in:
- lib/onlinepayments/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
41 42 43 44 |
# File 'lib/onlinepayments/sdk/logging/logging_util.rb', line 41 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.
47 48 49 |
# File 'lib/onlinepayments/sdk/logging/logging_util.rb', line 47 def obfuscate_value(value) value.nil? or value.empty? ? value : "***" end |