Class: Anon::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/anon/cli.rb

Overview

Command Line Interface for Anon

Instance Method Summary collapse

Instance Method Details

#csvObject

The cli command to launch the CSV anonymiser Input and output may be set to filepaths, or default to stdin and out The columns to be anonymised can be set, or we default to a detection stratergy if there is a header row Optionly we can choose to process files without a header row, but then columns must be set



31
32
33
34
# File 'lib/anon/cli.rb', line 31

def csv
  require 'anon/csv'
  Anon::CSV.anonymise!(input, output, options[:columns], options[:header])
end

#textObject

The cli command to launch the Text anonymiser Input and output may be set to filepaths, or default to stdin and out



48
49
50
51
# File 'lib/anon/cli.rb', line 48

def text
  require 'anon/text'
  Anon::Text.anonymise!(input, output)
end