Class: Ingenico::Connect::SDK::Logging::Obfuscator Deprecated

Inherits:
Object
  • Object
show all
Defined in:
lib/ingenico/connect/sdk/logging/logging_util.rb

Overview

Deprecated.

This class shouldn’t have been exposed

Direct Known Subclasses

HeaderObfuscator, PropertyObfuscator

Defined Under Namespace

Classes: Builder, HashClod

Instance Method Summary collapse

Constructor Details

#initialize(obfuscators, case_insensitive) ⇒ Obfuscator

Returns a new instance of Obfuscator.

Raises:

  • (ArgumentError)


85
86
87
88
# File 'lib/ingenico/connect/sdk/logging/logging_util.rb', line 85

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



122
123
124
125
# File 'lib/ingenico/connect/sdk/logging/logging_util.rb', line 122

def obfuscate_value(key, value)
  obfuscator = @obfuscators[key]
  obfuscator.nil? ? value : obfuscator.obfuscate_value(value)
end