From 124b68f3a2889aa411f5af995015db9a9bac133d Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Tue, 30 Jul 2024 13:20:46 +0200 Subject: Add trains accessor --- lib/Travel/Status/DE/DBWagenreihung/Group.pm | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/Travel/Status/DE/DBWagenreihung/Group.pm') diff --git a/lib/Travel/Status/DE/DBWagenreihung/Group.pm b/lib/Travel/Status/DE/DBWagenreihung/Group.pm index b6848ab..3da0670 100644 --- a/lib/Travel/Status/DE/DBWagenreihung/Group.pm +++ b/lib/Travel/Status/DE/DBWagenreihung/Group.pm @@ -89,6 +89,8 @@ sub new { train_no => $json{transport}{number}, }; + $ref->{train} = $ref->{train_type} . ' ' . $ref->{train_no}; + $ref->{sectors} = [ uniq grep { defined } map { $_->{platformPosition}{sector} } @{ $json{vehicles} // [] } -- cgit v1.2.3