### Spec file for Parse
require 'rspec'
require 'parse'
describe Parse do
it 'reads a file as input from the comand line' do
end
end
#!~/school/env ruby
## Simple Parser read in a file from the command line and spit it back out like cat
## Loosely based on Gregory Brown's article on Command line Utilities
class Reader
## This reads in the file on the Command line
def Initialize(arg)
@params, @args = parse_options(argv)
@display = Par::Display.new(@params)
end
def run
if @files.empty?
@display.render(STDIN)
else
@files.each do |filename|
File.open(filename) { |f| @display.render(f) }
end
end
end
def parse_options(argv)
# ignore this for now
end
end
class Parser
# This is simple parsing of the file
end