class Sidekiq::Logging::ArgumentFilter
Class that allows to filter-out sensible arguments.
Constants
- FILTERED
String used to replace sensible arguments.
Public Class Methods
new(filters = [])
click to toggle source
# File lib/sidekiq/logging/argument_filter.rb, line 12 def initialize(filters = []) @filters = filters end
Public Instance Methods
filter(args)
click to toggle source
Filters argument by using the filters provided upon initialization. @param args [Hash] the list of arguments in a hash with key :args.
# File lib/sidekiq/logging/argument_filter.rb, line 18 def filter(args) compiled_filter.call(args) end
Private Instance Methods
compiled_filter()
click to toggle source
# File lib/sidekiq/logging/argument_filter.rb, line 24 def compiled_filter @compiled_filter ||= CompiledFilter.compile(@filters) end