class Log def initialize (x,y,list,url) @line = 0 @x=x @y=y @url=url @list=list @points = Hash.new(0) @list.each do |point| @points[point.xy] +=1 end @reps = @points.values.max end attr_reader :x, :y, :list, :reps, :url def next coord = @list[@line] @line += 1 return coord end end