File Coverage

blib/lib/Opendata/GTFS/Type/Trip.pm
Criterion Covered Total %
statement 70 70 100.0
branch 2 2 100.0
condition n/a
subroutine 6 6 100.0
pod n/a
total 78 78 100.0


line stmt bran cond sub pod time code
1 2     2   9 use Opendata::GTFS::Standard;
  2         3  
  2         13  
2 2     2   2476 use strict;
  2         2  
  2         50  
3 2     2   6 use warnings;
  2         2  
  2         64  
4              
5             # PODNAME: Opendata::GTFS::Type::Trip
6             # ABSTRACT: Trip
7              
8 2     2   2961 class Opendata::GTFS::Type::Trip using Moose {
  2     2   45  
  2     2   10  
  2         3  
  2         112  
  2         8  
  2         3  
  2         16  
  2         505  
  2         2  
  2         13  
  2         113  
  2         2  
  2         93  
  2         9  
  2         3  
  2         160  
  2         53  
  2         9  
  2         2  
  2         12  
  2         5934  
  2         4  
  2         14  
  2         9946  
  2         3  
  2         17  
  2         6254  
  2         4  
  2         21  
  2         135  
  2         5  
  2         14  
  2         397  
  2         3  
  2         15  
  2         1849  
  2         4  
  2         13  
  2         8752  
  2         4  
  2         70  
  2         7  
  2         3  
  2         69  
  2         6  
  2         4  
  2         96  
  2         8  
  2         2  
  2         273  
  2         39  
  2         27530  
  2         34  
  2         3604  
9              
10 2         24 our $VERSION = '0.0102'; # VERSION
11              
12 2         9 my @columns = qw/
13             1 route_id
14             1 service_id
15             1 trip_id
16             0 trip_headsign
17             0 trip_short_name
18             0 direction_id
19             0 block_id
20             0 shape_id
21             0 wheelchair_accessible
22             0 bikes_allowed
23             /;
24              
25 2         9 for (my $i = 0; $i < $#columns; $i += 2) {
26 20         30912 my $required = $columns[$i];
27 20         30 my $column = $columns[$i + 1];
28              
29 20 100       69 has $column => (
30             is => 'ro',
31             isa => ($required ? Str : Maybe[Str]),
32             );
33             }
34             }
35              
36             1;
37              
38             __END__
39              
40             =pod
41              
42             =encoding utf-8
43              
44             =head1 NAME
45              
46             Opendata::GTFS::Type::Trip - Trip
47              
48             =head1 VERSION
49              
50             Version 0.0102, released 2015-02-19.
51              
52              
53              
54             =head1 ATTRIBUTES
55              
56              
57             =head2 bikes_allowed
58              
59             =begin HTML
60              
61             <table cellpadding="0" cellspacing="0">
62             <tr><td style="padding-right: 6px; padding-left: 6px; border-right: 1px solid #b8b8b8; white-space: nowrap;"><a href="https://metacpan.org/pod/Types::Standard#Maybe">Maybe</a> [ <a href="https://metacpan.org/pod/Types::Standard#Str">Str</a> ]</td>
63             <td style="padding-right: 6px; padding-left: 6px; border-right: 1px solid #b8b8b8; white-space: nowrap;">optional</td>
64             <td style="padding-left: 6px; padding-right: 6px; white-space: nowrap;">read-only</td></tr>
65             </table>
66              
67             <p></p>
68              
69             =end HTML
70              
71             =head2 block_id
72              
73             =begin HTML
74              
75             <table cellpadding="0" cellspacing="0">
76             <tr><td style="padding-right: 6px; padding-left: 6px; border-right: 1px solid #b8b8b8; white-space: nowrap;"><a href="https://metacpan.org/pod/Types::Standard#Maybe">Maybe</a> [ <a href="https://metacpan.org/pod/Types::Standard#Str">Str</a> ]</td>
77             <td style="padding-right: 6px; padding-left: 6px; border-right: 1px solid #b8b8b8; white-space: nowrap;">optional</td>
78             <td style="padding-left: 6px; padding-right: 6px; white-space: nowrap;">read-only</td></tr>
79             </table>
80              
81             <p></p>
82              
83             =end HTML
84              
85             =head2 direction_id
86              
87             =begin HTML
88              
89             <table cellpadding="0" cellspacing="0">
90             <tr><td style="padding-right: 6px; padding-left: 6px; border-right: 1px solid #b8b8b8; white-space: nowrap;"><a href="https://metacpan.org/pod/Types::Standard#Maybe">Maybe</a> [ <a href="https://metacpan.org/pod/Types::Standard#Str">Str</a> ]</td>
91             <td style="padding-right: 6px; padding-left: 6px; border-right: 1px solid #b8b8b8; white-space: nowrap;">optional</td>
92             <td style="padding-left: 6px; padding-right: 6px; white-space: nowrap;">read-only</td></tr>
93             </table>
94              
95             <p></p>
96              
97             =end HTML
98              
99             =head2 route_id
100              
101             =begin HTML
102              
103             <table cellpadding="0" cellspacing="0">
104             <tr><td style="padding-right: 6px; padding-left: 6px; border-right: 1px solid #b8b8b8; white-space: nowrap;"><a href="https://metacpan.org/pod/Types::Standard#Str">Str</a>
105              
106             </td>
107             <td style="padding-right: 6px; padding-left: 6px; border-right: 1px solid #b8b8b8; white-space: nowrap;">optional</td>
108             <td style="padding-left: 6px; padding-right: 6px; white-space: nowrap;">read-only</td></tr>
109             </table>
110              
111             <p></p>
112              
113             =end HTML
114              
115             =head2 service_id
116              
117             =begin HTML
118              
119             <table cellpadding="0" cellspacing="0">
120             <tr><td style="padding-right: 6px; padding-left: 6px; border-right: 1px solid #b8b8b8; white-space: nowrap;"><a href="https://metacpan.org/pod/Types::Standard#Str">Str</a>
121              
122             </td>
123             <td style="padding-right: 6px; padding-left: 6px; border-right: 1px solid #b8b8b8; white-space: nowrap;">optional</td>
124             <td style="padding-left: 6px; padding-right: 6px; white-space: nowrap;">read-only</td></tr>
125             </table>
126              
127             <p></p>
128              
129             =end HTML
130              
131             =head2 shape_id
132              
133             =begin HTML
134              
135             <table cellpadding="0" cellspacing="0">
136             <tr><td style="padding-right: 6px; padding-left: 6px; border-right: 1px solid #b8b8b8; white-space: nowrap;"><a href="https://metacpan.org/pod/Types::Standard#Maybe">Maybe</a> [ <a href="https://metacpan.org/pod/Types::Standard#Str">Str</a> ]</td>
137             <td style="padding-right: 6px; padding-left: 6px; border-right: 1px solid #b8b8b8; white-space: nowrap;">optional</td>
138             <td style="padding-left: 6px; padding-right: 6px; white-space: nowrap;">read-only</td></tr>
139             </table>
140              
141             <p></p>
142              
143             =end HTML
144              
145             =head2 trip_headsign
146              
147             =begin HTML
148              
149             <table cellpadding="0" cellspacing="0">
150             <tr><td style="padding-right: 6px; padding-left: 6px; border-right: 1px solid #b8b8b8; white-space: nowrap;"><a href="https://metacpan.org/pod/Types::Standard#Maybe">Maybe</a> [ <a href="https://metacpan.org/pod/Types::Standard#Str">Str</a> ]</td>
151             <td style="padding-right: 6px; padding-left: 6px; border-right: 1px solid #b8b8b8; white-space: nowrap;">optional</td>
152             <td style="padding-left: 6px; padding-right: 6px; white-space: nowrap;">read-only</td></tr>
153             </table>
154              
155             <p></p>
156              
157             =end HTML
158              
159             =head2 trip_id
160              
161             =begin HTML
162              
163             <table cellpadding="0" cellspacing="0">
164             <tr><td style="padding-right: 6px; padding-left: 6px; border-right: 1px solid #b8b8b8; white-space: nowrap;"><a href="https://metacpan.org/pod/Types::Standard#Str">Str</a>
165              
166             </td>
167             <td style="padding-right: 6px; padding-left: 6px; border-right: 1px solid #b8b8b8; white-space: nowrap;">optional</td>
168             <td style="padding-left: 6px; padding-right: 6px; white-space: nowrap;">read-only</td></tr>
169             </table>
170              
171             <p></p>
172              
173             =end HTML
174              
175             =head2 trip_short_name
176              
177             =begin HTML
178              
179             <table cellpadding="0" cellspacing="0">
180             <tr><td style="padding-right: 6px; padding-left: 6px; border-right: 1px solid #b8b8b8; white-space: nowrap;"><a href="https://metacpan.org/pod/Types::Standard#Maybe">Maybe</a> [ <a href="https://metacpan.org/pod/Types::Standard#Str">Str</a> ]</td>
181             <td style="padding-right: 6px; padding-left: 6px; border-right: 1px solid #b8b8b8; white-space: nowrap;">optional</td>
182             <td style="padding-left: 6px; padding-right: 6px; white-space: nowrap;">read-only</td></tr>
183             </table>
184              
185             <p></p>
186              
187             =end HTML
188              
189             =head2 wheelchair_accessible
190              
191             =begin HTML
192              
193             <table cellpadding="0" cellspacing="0">
194             <tr><td style="padding-right: 6px; padding-left: 6px; border-right: 1px solid #b8b8b8; white-space: nowrap;"><a href="https://metacpan.org/pod/Types::Standard#Maybe">Maybe</a> [ <a href="https://metacpan.org/pod/Types::Standard#Str">Str</a> ]</td>
195             <td style="padding-right: 6px; padding-left: 6px; border-right: 1px solid #b8b8b8; white-space: nowrap;">optional</td>
196             <td style="padding-left: 6px; padding-right: 6px; white-space: nowrap;">read-only</td></tr>
197             </table>
198              
199             <p></p>
200              
201             =end HTML
202              
203             =head1 SOURCE
204              
205             L<https://github.com/Csson/p5-Opendata-GTFS-Feed>
206              
207             =head1 HOMEPAGE
208              
209             L<https://metacpan.org/release/Opendata-GTFS-Feed>
210              
211             =head1 AUTHOR
212              
213             Erik Carlsson <info@code301.com>
214              
215             =head1 COPYRIGHT AND LICENSE
216              
217             This software is copyright (c) 2015 by Erik Carlsson <info@code301.com>.
218              
219             This is free software; you can redistribute it and/or modify it under
220             the same terms as the Perl 5 programming language system itself.
221              
222             =cut