Advertisement
Guest User

Untitled

a guest
Nov 11th, 2014
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. unless ARGV.size == 2
  2. STDERR.puts "Error: Incorrect number of arguements\n\nOK. Goodbye."
  3.  
  4. else
  5. hash = {}
  6. puts "Processing: #{ARGV[0]} (input), #{ARGV[1]} (output)"
  7.  
  8. in_file = File.new(ARGV[0], 'r')
  9.  
  10. in_file.each_line.with_index do |line, idx|
  11. print line
  12. line.split(' ').each do |pair|
  13. key, value = pair.split(/:/)
  14. hash[key] = value
  15. end
  16.  
  17. puts hash.inspect
  18. #Determine shape type
  19. #return data types
  20. end
  21.  
  22. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement