module PgDumpAnonymize

Constants

VERSION

Public Class Methods

anonymize(definitions_file_path, input_io, output_io) click to toggle source
# File lib/pg_dump_anonymize.rb, line 9
def self.anonymize(definitions_file_path, input_io, output_io)
  definitions_hash = eval(File.open(definitions_file_path).read) # rubocop:disable Security/Eval
  definitions = Definition.new(definitions_hash)

  input_io.each_line do |line|
    output_io.write definitions.process_line(line)
  end
end