summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Travel/Status/DE/EFA/Trip.pm25
1 files changed, 13 insertions, 12 deletions
diff --git a/lib/Travel/Status/DE/EFA/Trip.pm b/lib/Travel/Status/DE/EFA/Trip.pm
index acc83c4..e6c1b8e 100644
--- a/lib/Travel/Status/DE/EFA/Trip.pm
+++ b/lib/Travel/Status/DE/EFA/Trip.pm
@@ -12,7 +12,8 @@ use parent 'Class::Accessor';
our $VERSION = '3.01';
Travel::Status::DE::EFA::Trip->mk_ro_accessors(
- qw(operator product product_class name line number type id dest_name dest_id));
+ qw(operator product product_class name line number type id dest_name dest_id)
+);
sub new {
my ( $obj, %conf ) = @_;
@@ -20,18 +21,18 @@ sub new {
my $json = $conf{json}{transportation};
my $ref = {
- operator => $json->{operator}{name},
- product => $json->{product}{name},
+ operator => $json->{operator}{name},
+ product => $json->{product}{name},
product_class => $json->{product}{class},
- polyline => $json->{coords},
- name => $json->{name},
- line => $json->{disassembledName},
- number => $json->{properties}{trainNumber},
- type => $json->{properties}{trainType} // $json->{product}{name},
- id => $json->{id},
- dest_name => $json->{destination}{name},
- dest_id => $json->{destination}{id},
- route_raw => $json->{locationSequence},
+ polyline => $json->{coords},
+ name => $json->{name},
+ line => $json->{disassembledName},
+ number => $json->{properties}{trainNumber},
+ type => $json->{properties}{trainType} // $json->{product}{name},
+ id => $json->{id},
+ dest_name => $json->{destination}{name},
+ dest_id => $json->{destination}{id},
+ route_raw => $json->{locationSequence},
strptime_obj => DateTime::Format::Strptime->new(
pattern => '%Y-%m-%dT%H:%M:%SZ',
time_zone => 'UTC'