Module: PactBroker::Config::RuntimeConfigurationLoggingMethods::ClassMethods

Defined in:
lib/pact_broker/config/runtime_configuration_logging_methods.rb

Instance Method Summary collapse

Instance Method Details

#sensitive_value?(value) ⇒ Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/pact_broker/config/runtime_configuration_logging_methods.rb', line 19

def sensitive_value?(value)
  sensitive_values.any? { |key| key == value || key == value.to_sym || key.kind_of?(Regexp) && key =~ value }
end

#sensitive_values(*values) ⇒ Object



10
11
12
13
14
15
16
17
# File 'lib/pact_broker/config/runtime_configuration_logging_methods.rb', line 10

def sensitive_values(*values)
  @sensitive_values ||= []
  if values
    @sensitive_values.concat([*values])
  else
    @sensitive_values
  end
end