| 1 | package Weather::YR::Model::Precipitation; | ||
| 2 | 3 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | 3 | ▶ | use namespace::autoclean; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | |||
| 5 | 3 | 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 | 3 | 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 | 3 | 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 | 3 | 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 | 3 | has 'symbol' => ( | |
| 66 | isa => 'Weather::YR::Model::Precipitation::Symbol', | ||
| 67 | is => 'ro', | ||
| 68 | required => 1, | ||
| 69 | ); | ||
| 70 | |||
| 71 | # | ||
| 72 | # The End | ||
| 73 | # | ||
| 74 | 3 | __PACKAGE__->meta->make_immutable; | |
| 75 | |||
| 76 | 3 | 1; | |