Sha256: 58c3251163054d15604f5cbfb5dc0dfc8e904b26c3318911ea6fecfc937f3b5e
Contents?: true
Size: 328 Bytes
Versions: 26
Compression:
Stored size: 328 Bytes
Contents
#!/usr/bin/env ruby require 'tmpdir' data = [] STDIN.each_line do |line| data.push(line) end Dir.mktmpdir do |directory| stdin_file = "#{directory}/stdin" File.open(stdin_file, 'w+') do |file| data.each do |line| file.write(line) end end system "vim #{stdin_file}" puts File.read(stdin_file) end
Version data entries
26 entries across 26 versions & 1 rubygems