Created
October 24, 2008 21:36
-
-
Save drio/19602 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Read first line and order the input | |
l1 = File.open("./input.txt", "r").read.split[1].split(',') | |
# Create a struct class to hold the stats per lane | |
line_stats = Struct.new(:c, :d, :a, :b) | |
# Instantiate a stat lines with the input data | |
l1_stats = line_stats.new(*l1) | |
# Display the contents of the struct | |
puts l1_stats.inspect |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment