summaryrefslogtreecommitdiff
path: root/lib/Travel/Status
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-11-16 09:47:38 +0100
committerDaniel Friesel <derf@finalrewind.org>2011-11-16 09:47:38 +0100
commit6b8626fd76efa0c779c2a3d4944279ba7a4827df (patch)
treec1a130ab220e3d9e11bb2b2b79466ebeace0c9ca /lib/Travel/Status
parentd668c5680d983495ef165e4b464f7d3f3e11d358 (diff)
Update tests
Diffstat (limited to 'lib/Travel/Status')
-rw-r--r--lib/Travel/Status/DE/VRR.pm12
-rw-r--r--lib/Travel/Status/DE/VRR/Result.pm4
2 files changed, 10 insertions, 6 deletions
diff --git a/lib/Travel/Status/DE/VRR.pm b/lib/Travel/Status/DE/VRR.pm
index 4e647c2..156e815 100644
--- a/lib/Travel/Status/DE/VRR.pm
+++ b/lib/Travel/Status/DE/VRR.pm
@@ -110,7 +110,7 @@ sub new {
return $self;
}
-sub new_from_html {
+sub new_from_xml {
my ( $class, %opt ) = @_;
my $self = { xml => $opt{xml}, };
@@ -156,10 +156,11 @@ sub results {
$e_time->getAttribute('hour'),
$e_time->getAttribute('minute'),
);
- my $platform = $e->getAttribute('platform');
- my $line = $e_line->getAttribute('number');
- my $dest = $e_line->getAttribute('direction');
- my $info = undef;
+ my $platform = $e->getAttribute('platform');
+ my $line = $e_line->getAttribute('number');
+ my $dest = $e_line->getAttribute('direction');
+ my $info = undef;
+ my $countdown = $e->getAttribute('countdown');
push(
@results,
@@ -169,6 +170,7 @@ sub results {
platform => $platform,
line => $line,
destination => $dest,
+ countdown => $countdown,
info => $info,
)
);
diff --git a/lib/Travel/Status/DE/VRR/Result.pm b/lib/Travel/Status/DE/VRR/Result.pm
index 0b2abf0..93df048 100644
--- a/lib/Travel/Status/DE/VRR/Result.pm
+++ b/lib/Travel/Status/DE/VRR/Result.pm
@@ -9,7 +9,9 @@ use parent 'Class::Accessor';
our $VERSION = '0.02';
Travel::Status::DE::VRR::Result->mk_ro_accessors(
- qw(destination time platform line info));
+ qw(destination date time platform line info
+ countdown type)
+);
sub new {
my ( $obj, %conf ) = @_;