Class: Anon::CSV
Overview
Replaces the contents of a set of columns in a CSV stream with anonymous e-mails.
Defined Under Namespace
Classes: Columns
Instance Method Summary collapse
-
#anonymise! ⇒ Object
Anonymises all content of the columns set in the initializer.
-
#initialize(input, output, columns_to_anonymise, has_header = true) ⇒ CSV
constructor
Returns a new instance of the CSV anonymiser.
Methods inherited from Base
Constructor Details
#initialize(input, output, columns_to_anonymise, has_header = true) ⇒ CSV
Returns a new instance of the CSV anonymiser
15 16 17 18 19 20 |
# File 'lib/anon/csv.rb', line 15 def initialize(input, output, columns_to_anonymise, has_header = true) @input = input @output = output @columns_to_anonymise = columns_to_anonymise @has_header = has_header end |
Instance Method Details
#anonymise! ⇒ Object
Anonymises all content of the columns set in the initializer
23 24 25 26 27 28 29 30 31 |
# File 'lib/anon/csv.rb', line 23 def anonymise! start_progress map_lines do |line| anonymise(line) increment_progress line end complete_progress end |