national-rail 0.3.7 → 0.3.8
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/national-rail/journey_planner.rb +2 -2
- metadata +2 -2
@@ -140,7 +140,7 @@ module NationalRail
|
|
140
140
|
|
141
141
|
(times_page.doc/"table#outboundJourneyTable > tbody > tr").reject { |tr| %w(status changes).include?(tr.attributes["class"].value) }.each do |tr|
|
142
142
|
|
143
|
-
if (tr.attributes["class"] == "day-heading")
|
143
|
+
if (tr.attributes["class"].value == "day-heading")
|
144
144
|
date = Date.parse((tr/"th > p > span").first.inner_text.strip)
|
145
145
|
next
|
146
146
|
end
|
@@ -151,7 +151,7 @@ module NationalRail
|
|
151
151
|
anchor = (tr/"a[@id^=journeyOption]").first
|
152
152
|
next unless anchor
|
153
153
|
|
154
|
-
link = times_page.links.detect { |l| l.attributes["id"] == anchor["id"] }
|
154
|
+
link = times_page.links.detect { |l| l.attributes["id"] == anchor.attributes["id"].value }
|
155
155
|
|
156
156
|
summary_rows << SummaryRow.new(@agent, date, departure_time, number_of_changes, link)
|
157
157
|
end
|