Class: MaskSQL::CLI

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

Instance Method Summary collapse

Instance Method Details

#maskObject



16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/mask_sql/cli.rb', line 16

def mask
  converter_options = options.dup

  if options[:config]
    converter_options[:config] = File.expand_path(options[:config])
  else
    default_config = File.expand_path('.mask.yml')
    converter_options[:config] = default_config if File.exist?(default_config)
  end

  converter = Converter.new(converter_options)
  converter.mask
  puts "\e[32mDone.\e[0m"
end

#versionObject



34
35
36
# File 'lib/mask_sql/cli.rb', line 34

def version
  puts "mask_sql #{MaskSQL::VERSION}"
end