summaryrefslogtreecommitdiff
path: root/lib/Travel/Status/DE/DBWagenreihung.pm
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2024-07-30 13:20:46 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2024-07-30 13:20:46 +0200
commit124b68f3a2889aa411f5af995015db9a9bac133d (patch)
tree09756227c3447478abfa578566090097839d99b9 /lib/Travel/Status/DE/DBWagenreihung.pm
parentefb13e90e8352c54741832a6f5d950b011c79998 (diff)
Add trains accessor
Diffstat (limited to 'lib/Travel/Status/DE/DBWagenreihung.pm')
-rw-r--r--lib/Travel/Status/DE/DBWagenreihung.pm7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Travel/Status/DE/DBWagenreihung.pm b/lib/Travel/Status/DE/DBWagenreihung.pm
index 9dce04e..b120b14 100644
--- a/lib/Travel/Status/DE/DBWagenreihung.pm
+++ b/lib/Travel/Status/DE/DBWagenreihung.pm
@@ -158,6 +158,7 @@ sub parse_wagonorder {
$self->parse_carriages;
$self->{destinations} = $self->merge_group_attr('destination');
$self->{train_numbers} = $self->merge_group_attr('train_no');
+ $self->{trains} = $self->merge_group_attr('train');
}
sub merge_group_attr {
@@ -272,6 +273,12 @@ sub train_numbers {
return @{ $self->{train_numbers} // [] };
}
+sub trains {
+ my ($self) = @_;
+
+ return @{ $self->{trains} // [] };
+}
+
sub sectors {
my ($self) = @_;