summaryrefslogtreecommitdiff
path: root/lib/Travel/Status/DE/EFA/Result.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Travel/Status/DE/EFA/Result.pm')
-rw-r--r--lib/Travel/Status/DE/EFA/Result.pm13
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/Travel/Status/DE/EFA/Result.pm b/lib/Travel/Status/DE/EFA/Result.pm
index d516e25..bb0243b 100644
--- a/lib/Travel/Status/DE/EFA/Result.pm
+++ b/lib/Travel/Status/DE/EFA/Result.pm
@@ -12,9 +12,14 @@ our $VERSION = '1.11';
Travel::Status::DE::EFA::Result->mk_ro_accessors(
qw(countdown date delay destination is_cancelled info key line lineref
- platform platform_db platform_name sched_date sched_time time type)
+ mot platform platform_db platform_name sched_date sched_time time type)
);
+my @mot_mapping = qw{
+ zug s-bahn u-bahn stadtbahn tram stadtbus regionalbus
+ schnellbus seilbahn schiff ast sonstige
+};
+
sub new {
my ( $obj, %conf ) = @_;
@@ -31,6 +36,12 @@ sub new {
return bless( $ref, $obj );
}
+sub mot_name {
+ my ($self) = @_;
+
+ return $mot_mapping[ $self->{mot} ] // 'sonstige';
+}
+
sub route_pre {
my ($self) = @_;