Method: Cript::CriptCommand#run!

Defined in:
lib/cript/cript_command.rb

#run!Object



25
26
27
28
29
30
31
32
33
34
35
# File 'lib/cript/cript_command.rb', line 25

def run!
  cripter = build_cripter
  data = read_data
  get_writer do |writer|
    if @options[:mode] == 'encrypt'
      writer.print cripter.encrypt(data)
    else
      writer.print cripter.decrypt(data)
    end
  end
end