Class: Ingenico::Direct::SDK::Logging::Obfuscator::Builder

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

Overview

A convenient wrapper to build obfuscators

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeBuilder

Returns a new instance of Builder.

Raises:

  • (NotImplementedError)


100
101
102
# File 'lib/ingenico/direct/sdk/logging/logging_util.rb', line 100

def initialize
  raise NotImplementedError, "#{self.class.name} is not implemented."
end

Instance Attribute Details

#obfuscatorsObject

Returns the value of attribute obfuscators.



98
99
100
# File 'lib/ingenico/direct/sdk/logging/logging_util.rb', line 98

def obfuscators
  @obfuscators
end

Instance Method Details

#buildObject

Raises:

  • (NotImplementedError)


114
115
116
# File 'lib/ingenico/direct/sdk/logging/logging_util.rb', line 114

def build
  raise NotImplementedError, "#{self.class.name}#build() is not implemented."
end

#with_field(key) ⇒ Object



104
105
106
107
# File 'lib/ingenico/direct/sdk/logging/logging_util.rb', line 104

def with_field(key)
  @obfuscators[key] = ValueObfuscator.INSTANCE
  self
end

#with_sensitive_field(key) ⇒ Object



109
110
111
112
# File 'lib/ingenico/direct/sdk/logging/logging_util.rb', line 109

def with_sensitive_field(key)
  @obfuscators[key] = SensitiveValueObfuscator.INSTANCE
  self
end