summaryrefslogtreecommitdiff
path: root/lib/Travel
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2013-12-22 15:20:53 +0100
committerDaniel Friesel <derf@finalrewind.org>2013-12-22 15:20:53 +0100
commit2a0fe74619afb9b5c40d301a12b6167f5e4608d6 (patch)
treeae632613d0e992955a6c991efab6a205106253e4 /lib/Travel
parent91d1c93160cfd34bb667ca4ce1a9c380b5d6eea1 (diff)
Result->route_timetable: Return a list
Diffstat (limited to 'lib/Travel')
-rw-r--r--lib/Travel/Status/DE/URA/Result.pm12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/Travel/Status/DE/URA/Result.pm b/lib/Travel/Status/DE/URA/Result.pm
index f8eddcd..938cba2 100644
--- a/lib/Travel/Status/DE/URA/Result.pm
+++ b/lib/Travel/Status/DE/URA/Result.pm
@@ -10,7 +10,7 @@ our $VERSION = '0.00';
Travel::Status::DE::URA::Result->mk_ro_accessors(
qw(countdown countdown_sec date datetime destination line line_id
- route_timetable stop stop_id time)
+ stop stop_id time)
);
sub new {
@@ -21,6 +21,12 @@ sub new {
return bless( $ref, $obj );
}
+sub route_timetable {
+ my ($self) = @_;
+
+ return @{ $self->{route_timetable} };
+}
+
sub TO_JSON {
my ($self) = @_;
@@ -96,10 +102,10 @@ The number of the line.
If the B<results> method of Travel::Status::DE::URA(3pm) was called with
B<full_routes> => true:
-Returns an arrayref of arrayrefs describing the entire route. I.e.
+Returns a list of arrayrefs describing the entire route. I.e.
C<< [[$time1, $stop1], [$time2, $stop2], ...] >>.
The times are DateTime::Duration(3pm) objects, the stops are only names,
-not IDs (subject to change). Returns an empty arrayref otherwise.
+not IDs (subject to change). Returns an empty list otherwise.
=item $departure->stop