Class: Masking::Main

Inherits:
Object
  • Object
show all
Defined in:
lib/masking.rb

Instance Method Summary collapse

Constructor Details

#initialize(input: $stdin, output: $stdout) ⇒ Main

Returns a new instance of Main.



16
17
18
19
# File 'lib/masking.rb', line 16

def initialize(input: $stdin, output: $stdout)
  @input  = input.set_encoding(Encoding::ASCII_8BIT, Encoding::ASCII_8BIT)
  @output = output.set_encoding(Encoding::ASCII_8BIT, Encoding::ASCII_8BIT)
end

Instance Method Details

#runObject



21
22
23
24
25
# File 'lib/masking.rb', line 21

def run
  input.each_line do |line|
    output.print SQLDumpLine.new(line).output
  end
end