summaryrefslogtreecommitdiff
path: root/lib/Travel/Status
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2024-03-29 12:35:56 +0100
committerBirte Kristina Friesel <derf@finalrewind.org>2024-03-29 12:35:56 +0100
commit3fd3f93c92bc38650eb0653b5cf5c707a5dae747 (patch)
tree1361cb598c3adff157a7853eff23296032f9e862 /lib/Travel/Status
parent1e4083c05a5b317ddfa1232b76eb5eafc1d29e2b (diff)
Wagon: add is_closed accessor
Diffstat (limited to 'lib/Travel/Status')
-rw-r--r--lib/Travel/Status/DE/DBWagenreihung/Wagon.pm11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/Travel/Status/DE/DBWagenreihung/Wagon.pm b/lib/Travel/Status/DE/DBWagenreihung/Wagon.pm
index eddf4b1..ffc3e58 100644
--- a/lib/Travel/Status/DE/DBWagenreihung/Wagon.pm
+++ b/lib/Travel/Status/DE/DBWagenreihung/Wagon.pm
@@ -12,9 +12,9 @@ our $VERSION = '0.11';
Travel::Status::DE::DBWagenreihung::Wagon->mk_ro_accessors(
qw(attributes class_type group_index has_ac has_accessibility
has_bahn_comfort has_bike_storage has_bistro has_compartments
- has_family_area has_phone_area has_quiet_area is_dosto is_interregio
- is_locomotive is_powercar number model multipurpose section train_no
- train_subtype type uic_id)
+ has_family_area has_phone_area has_quiet_area is_closed is_dosto
+ is_interregio is_locomotive is_powercar number model multipurpose section
+ train_no train_subtype type uic_id)
);
our %type_attributes = (
@@ -74,6 +74,7 @@ sub new {
$ref->{has_bistro} = 0;
$ref->{is_locomotive} = 0;
$ref->{is_powercar} = 0;
+ $ref->{is_closed} = 0;
$ref->{train_no} = $opt{train_no};
$ref->{number} = $opt{wagenordnungsnummer};
$ref->{model} = $opt{fahrzeugnummer};
@@ -87,6 +88,10 @@ sub new {
$self->parse_type;
+ if ( $opt{status} and $opt{status} eq 'GESCHLOSSEN' ) {
+ $ref->{is_closed} = 1;
+ }
+
if ( $opt{kategorie} =~ m{SPEISEWAGEN} ) {
$ref->{has_bistro} = 1;
}