File Coverage

lib/WebService/OpenSky/Response/States.pm
Criterion Covered Total %
statement 17 17 100.0
branch 4 8 50.0
condition n/a
subroutine 4 4 100.0
pod n/a
total 25 29 86.2


line stmt bran cond sub pod time code
1             package WebService::OpenSky::Response::States;
2              
3             # ABSTRACT: A class representing a states response from the OpenSky Network API
4 8     8   70 use WebService::OpenSky::Moose;
  8         17  
  8         73  
5 8     8   114523 use WebService::OpenSky::Core::StateVector;
  8         24  
  8         1717  
6             extends 'WebService::OpenSky::Response';
7              
8             our $VERSION = '0.3';
9              
10 2 50   2   6 method _create_response_objects() {
  2 50       7  
  2         2  
  2         3  
11 2         5 return [ map { WebService::OpenSky::Core::StateVector->new($_) } $self->raw_response->{states}->@* ];
  3         5336  
12             }
13              
14 1 50   1   4 method _empty_response() {
  1 50       5  
  1         2  
  1         2  
15             return {
16 1         6 time => 0,
17             states => [],
18             };
19             }
20              
21             __END__
22              
23             =pod
24              
25             =encoding UTF-8
26              
27             =head1 NAME
28              
29             WebService::OpenSky::Response::States - A class representing a states response from the OpenSky Network API
30              
31             =head1 VERSION
32              
33             version 0.3
34              
35             =head1 DESCRIPTION
36              
37             This class inherits from L<WebService::OpenSky::Response>. Please see that
38             module for the available methods. Individual responses are from the
39             L<WebService::OpenSky::Core::StateVector> class.
40              
41             =head1 AUTHOR
42              
43             Curtis "Ovid" Poe <curtis.poe@gmail.com>
44              
45             =head1 COPYRIGHT AND LICENSE
46              
47             This software is Copyright (c) 2023 by Curtis "Ovid" Poe.
48              
49             This is free software, licensed under:
50              
51             The Artistic License 2.0 (GPL Compatible)
52              
53             =cut