lib/ratis/timetable.rb in ratis-2.5.2.4 vs lib/ratis/timetable.rb in ratis-2.5.2.5
- old
+ new
@@ -26,11 +26,16 @@
timetable.route_short_name = headway[:route]
timetable.direction = headway[:direction]
timetable.service_type = headway[:servicetype]
timetable.operator = headway[:operator]
timetable.effective = headway[:effective]
- timetable.timepoints = headway[:timepoints][:stop].collect{|tp| Timetable::Stop.new(tp[:atisstopid], tp[:stopid], tp[:description], tp[:area])}
- timetable.trips = headway[:times][:trip].collect{|t| Timetable::Trip.new(t[:time], t[:comment])}
+
+ stop = headway[:timepoints][:stop]
+ timetable.timepoints = [ Timetable::Stop.new(stop[:atisstopid], stop[:stopid], stop[:description], stop[:area]) ]
+
+ trip = headway[:times][:trip]
+ timetable.trips = [ Timetable::Trip.new(trip[:time], trip[:comment]) ]
+
timetable
end
end