national-rail 0.3.6 → 0.3.7
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/national-rail/journey_planner.rb +3 -0
- metadata +2 -2
@@ -147,7 +147,10 @@ module NationalRail
|
|
147
147
|
|
148
148
|
departure_time = TimeParser.new(date).time((tr/"td.leaving").inner_text.strip)
|
149
149
|
number_of_changes = (tr/"td:nth-child(6)").inner_text.strip
|
150
|
+
|
150
151
|
anchor = (tr/"a[@id^=journeyOption]").first
|
152
|
+
next unless anchor
|
153
|
+
|
151
154
|
link = times_page.links.detect { |l| l.attributes["id"] == anchor["id"] }
|
152
155
|
|
153
156
|
summary_rows << SummaryRow.new(@agent, date, departure_time, number_of_changes, link)
|