Class: Strike::Obfuscator
- Inherits:
-
Object
- Object
- Strike::Obfuscator
- Defined in:
- lib/strike/obfuscator.rb
Instance Method Summary collapse
-
#call(tables, input, output) ⇒ nil
Obfuscates the data from input to output with the given information.
-
#initialize(config = {}) ⇒ Obfuscator
constructor
A new instance of Obfuscator.
Constructor Details
#initialize(config = {}) ⇒ Obfuscator
Returns a new instance of Obfuscator.
7 8 9 |
# File 'lib/strike/obfuscator.rb', line 7 def initialize(config = {}) @adapter_source = config[:adapter_source] end |
Instance Method Details
#call(tables, input, output) ⇒ nil
Obfuscates the data from input to output with the given information.
18 19 20 21 22 23 |
# File 'lib/strike/obfuscator.rb', line 18 def call(tables, input, output) adapter = adapter_source.call(tables) adapter.globally_kept_columns = %w(id created_at updated_at) adapter.obfuscate(input, output) end |