File Coverage

blib/lib/Weather/YR/Model/Precipitation.pm
Criterion Covered Total %
statement 6 6 100.0
branch n/a
condition n/a
subroutine 2 2 100.0
pod n/a
total 8 8 100.0


line stmt bran cond sub pod time code
1             package Weather::YR::Model::Precipitation;
2 3     3   31 use Moose;
  3         12  
  3         24  
3 3     3   14217 use namespace::autoclean;
  3         9  
  3         28  
4              
5             extends 'Weather::YR::Model';
6              
7             =head1 NAME
8              
9             Weather::YR::Model::Precipitation
10              
11             =head1 DESCRIPTION
12              
13             This class represents one of a data point's many "precipitation" data points.
14              
15             =head1 METHODS
16              
17             This class inherits all the methods from L<Weather::YR::Model> and provides the
18             following new methods:
19              
20             =head2 value
21              
22             Returns the current data point's precipitation value.
23              
24             =cut
25              
26             has 'value' => (
27             isa => 'Num',
28             is => 'ro',
29             required => 1,
30             );
31              
32             =head2 min
33              
34             Returns the current data point's minimum precipitation value.
35              
36             =cut
37              
38             has 'min' => (
39             isa => 'Maybe[Num]',
40             is => 'ro',
41             required => 0,
42             default => 0,
43             );
44              
45             =head2 max
46              
47             Returns the current data point's maximum precipitation value.
48              
49             =cut
50              
51             has 'max' => (
52             isa => 'Maybe[Num]',
53             is => 'ro',
54             required => 0,
55             default => 0,
56             );
57              
58             =head2 symbol
59              
60             Returns the current data point's symbol data, represented by a
61             L<Weather::YR::Model::Precipitation::Symbol> object.
62              
63             =cut
64              
65             has 'symbol' => (
66             isa => 'Weather::YR::Model::Precipitation::Symbol',
67             is => 'ro',
68             required => 1,
69             );
70              
71             #
72             # The End
73             #
74             __PACKAGE__->meta->make_immutable;
75              
76             1;