Created
May 17, 2015 15:15
-
-
Save Aduciicba/49ad8056e38212b641d8 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
class Road | |
attr_accessor :low_bound, | |
:high_bound, | |
:transport_count, | |
:road_id | |
end | |
r = Road.new | |
r.road_id = 1 | |
r1 = Road.new | |
r1.road_id = 2 | |
arr = Array.new | |
arr << r | |
arr << r1 | |
i = 0 | |
while i < 10 | |
arr[i / 2].transport_count += 1 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment