Class: Epilog::Filter::Blacklist

Inherits:
HashKey
  • Object
show all
Defined in:
lib/epilog/filter/blacklist.rb

Direct Known Subclasses

FilterParameters

Constant Summary collapse

DEFAULT_BLACKLIST =
%w[
  password
  pass
  pw
  secret
].freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from HashKey

#call

Constructor Details

#initialize(blacklist = DEFAULT_BLACKLIST) ⇒ Blacklist

Returns a new instance of Blacklist.



15
16
17
18
# File 'lib/epilog/filter/blacklist.rb', line 15

def initialize(blacklist = DEFAULT_BLACKLIST)
  @blacklist = blacklist.map { |b| [b.to_s.downcase, nil] }.to_h
  super()
end

Instance Attribute Details

#blacklistObject (readonly)

Returns the value of attribute blacklist.



13
14
15
# File 'lib/epilog/filter/blacklist.rb', line 13

def blacklist
  @blacklist
end