diff options
-rwxr-xr-x | bin/aseag-m | 4 | ||||
-rw-r--r-- | lib/Travel/Status/DE/URA/Result.pm | 12 |
2 files changed, 11 insertions, 5 deletions
diff --git a/bin/aseag-m b/bin/aseag-m index 34db950..e2c4111 100755 --- a/bin/aseag-m +++ b/bin/aseag-m @@ -134,7 +134,7 @@ sub show_results { ), $_->[1] ) - } @{ $d->route_timetable } + } $d->route_timetable ) ] ); @@ -152,7 +152,7 @@ sub show_results { sprintf( '%s %s', $_->[0]->strftime($strftime_format), $_->[1] ) - } @{ $d->route_timetable } + } $d->route_timetable ) ] ); 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 |