summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2019-01-02 14:50:21 +0100
committerDaniel Friesel <derf@finalrewind.org>2019-01-02 14:50:21 +0100
commit1f28e0d5194b4671c1192a09f948d973608b3628 (patch)
treec177d6976948b09db1157c7c3e57a0de632a31d4 /lib
parent64af46a2ebc0ad096946bb33c54056b686846cce (diff)
show wagon model / series
Diffstat (limited to 'lib')
-rw-r--r--lib/Travel/Status/DE/DBWagenreihung/Wagon.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Travel/Status/DE/DBWagenreihung/Wagon.pm b/lib/Travel/Status/DE/DBWagenreihung/Wagon.pm
index f25e85c..5c2957e 100644
--- a/lib/Travel/Status/DE/DBWagenreihung/Wagon.pm
+++ b/lib/Travel/Status/DE/DBWagenreihung/Wagon.pm
@@ -13,7 +13,7 @@ our $VERSION = '0.00';
Travel::Status::DE::DBWagenreihung::Wagon->mk_ro_accessors(
qw(attributes class_type has_ac has_accessibility has_bistro has_compartments
has_multipurpose is_dosto is_interregio is_locomotive is_powercar number
- section type)
+ model section type)
);
sub new {
@@ -25,9 +25,12 @@ sub new {
$ref->{is_locomotive} = 0;
$ref->{is_powercar} = 0;
$ref->{number} = $opt{wagenordnungsnummer};
+ $ref->{model} = $opt{fahrzeugnummer};
$ref->{section} = $opt{fahrzeugsektor};
$ref->{type} = $opt{fahrzeugtyp};
+ $ref->{model} =~ s{^.....(...)....$}{$1};
+
my $self = bless( $ref, $obj );
$self->parse_type;