summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-12-02 23:21:41 +0100
committerDaniel Friesel <derf@finalrewind.org>2011-12-02 23:21:41 +0100
commit6ee62b87a668e4b3947440bb4dcd298bd4376e10 (patch)
treec28d0d02d7137f45052ac44915a197ac2cd13f60 /lib
parentf1922960a0aa9ad3cede1f7267e31d736895f134 (diff)
Result.pm: Add line accessor for ::VRR compatibility
Diffstat (limited to 'lib')
-rw-r--r--lib/Travel/Status/DE/DeutscheBahn/Result.pm18
1 files changed, 13 insertions, 5 deletions
diff --git a/lib/Travel/Status/DE/DeutscheBahn/Result.pm b/lib/Travel/Status/DE/DeutscheBahn/Result.pm
index 0c0d9dc..0175e03 100644
--- a/lib/Travel/Status/DE/DeutscheBahn/Result.pm
+++ b/lib/Travel/Status/DE/DeutscheBahn/Result.pm
@@ -25,6 +25,12 @@ sub destination {
return $self->{route_end};
}
+sub line {
+ my ($self) = @_;
+
+ return $self->{train};
+}
+
sub info {
my ($self) = @_;
@@ -191,6 +197,13 @@ Returns the train's delay in minutes, or undef if it is unknown.
Returns additional information, for instance the reason why the train is
delayed. May be an empty string if no (useful) information is available.
+=item $result->line
+
+=item $result->train
+
+Returns the line / train name, either in a format like "S 1" (S-Bahn line 1)
+or "RE 10111" (RegionalExpress train 10111, no line information).
+
=item $result->platform
Returns the platform from which the train will depart / at which it will
@@ -233,11 +246,6 @@ references of the form C<< [ arrival time, station name ] >>.
Returns the arrival/departure time as string in "hh:mm" format.
-=item $result->train
-
-Returns the line / train name, either in a format like "S 1" (S-Bahn line 1)
-or "RE 10111" (RegionalExpress train 10111, no line information).
-
=back
=head2 INTERNAL