Class: Ingenico::Connect::SDK::Logging::Obfuscator::Builder

Inherits:
Object
  • Object
show all
Defined in:
lib/ingenico/connect/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)


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

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

Instance Attribute Details

#obfuscatorsObject

Returns the value of attribute obfuscators.



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

def obfuscators
  @obfuscators
end

Instance Method Details

#buildObject

Raises:

  • (NotImplementedError)


147
148
149
# File 'lib/ingenico/connect/sdk/logging/logging_util.rb', line 147

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

#with_all(key) ⇒ Object



127
128
129
130
# File 'lib/ingenico/connect/sdk/logging/logging_util.rb', line 127

def with_all(key)
  @obfuscators[key] = ValueObfuscator.ALL
  self
end

#with_fixed_length(key, fixed_length) ⇒ Object



132
133
134
135
# File 'lib/ingenico/connect/sdk/logging/logging_util.rb', line 132

def with_fixed_length(key, fixed_length)
  @obfuscators[key] = ValueObfuscator.fixed_length(fixed_length)
  self
end

#with_keep_end_count(key, count) ⇒ Object



142
143
144
145
# File 'lib/ingenico/connect/sdk/logging/logging_util.rb', line 142

def with_keep_end_count(key, count)
  @obfuscators[key] = ValueObfuscator.keep_end_count(count)
  self
end

#with_keep_start_count(key, count) ⇒ Object



137
138
139
140
# File 'lib/ingenico/connect/sdk/logging/logging_util.rb', line 137

def with_keep_start_count(key, count)
  @obfuscators[key] = ValueObfuscator.keep_start_count(count)
  self
end