From 2a0fe74619afb9b5c40d301a12b6167f5e4608d6 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 22 Dec 2013 15:20:53 +0100 Subject: Result->route_timetable: Return a list --- lib/Travel/Status/DE/URA/Result.pm | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'lib/Travel/Status') 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 method of Travel::Status::DE::URA(3pm) was called with B => 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 -- cgit v1.2.3