Skip to content

Instantly share code, notes, and snippets.

@Aduciicba
Created May 17, 2015 15:15
Show Gist options
  • Save Aduciicba/49ad8056e38212b641d8 to your computer and use it in GitHub Desktop.
Save Aduciicba/49ad8056e38212b641d8 to your computer and use it in GitHub Desktop.
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