-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfileio.rb
More file actions
39 lines (39 loc) · 764 Bytes
/
Copy pathfileio.rb
File metadata and controls
39 lines (39 loc) · 764 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#
# require 'pry'
# require './parser_assigner'
#
# class FileIO
#
# attr_reader :handle, :input, :output
#
# def initialize(input=ARGV[0], output=ARGV[1])
# @handle = File.open(input, "r")
# @chunks = []
# @input = input
# @output = output
# end
#
# def read_input
# handle.read
# end
#
# def make_array(string)
# @chunks = string.split("\n\n")
# end
#
# def process_output
# html = File.open(output,'w+')
# html.write(html_string)
# html.rewind
# handle.rewind
# puts "Converted #{input} (#{handle.readlines.count.to_s} lines) to #{output} (#{html.readlines.count.to_s} lines)"
# handle.close
# html.close
# end
#
# end
#
# if __FILE__ == $0
# file = FileIO.new
# p file.read_input
# end