Class: Chamber::Filters::TranslateSecureKeysFilter

Inherits:
Object
  • Object
show all
Defined in:
lib/chamber/filters/translate_secure_keys_filter.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data:, secure_key_prefix:, **_args) ⇒ TranslateSecureKeysFilter

Returns a new instance of TranslateSecureKeysFilter.



17
18
19
20
# File 'lib/chamber/filters/translate_secure_keys_filter.rb', line 17

def initialize(data:, secure_key_prefix:, **_args)
  self.data             = data.deep_dup
  self.secure_key_token = /\A#{Regexp.escape(secure_key_prefix)}/
end

Instance Attribute Details

#dataObject

Returns the value of attribute data.



10
11
12
# File 'lib/chamber/filters/translate_secure_keys_filter.rb', line 10

def data
  @data
end

#secure_key_tokenObject

Returns the value of attribute secure_key_token.



10
11
12
# File 'lib/chamber/filters/translate_secure_keys_filter.rb', line 10

def secure_key_token
  @secure_key_token
end

Class Method Details

.execute(**args) ⇒ Object



13
14
15
# File 'lib/chamber/filters/translate_secure_keys_filter.rb', line 13

def self.execute(**args)
  new(**args).__send__(:execute)
end