Method: Processor.process
- Defined in:
- lib/csv2qif/processor.rb
.process(stdin, stdout, arguments, options) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/csv2qif/processor.rb', line 10 def process stdin, stdout, arguments, if arguments.empty? process_file stdin, stdout, else arguments.each do |file| mode = ['r', [:encoding]].compact.join(':') stream_in = File.open(file, mode) stream_out = File.new esub(file, :csv, :qif), "w" begin process_file stream_in, stream_out, ensure stream_in.close stream_out.close end end end end |