Clicker/Data/Series/Size.pm

filter: Statementstmt 100% 23 / 23 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod n/a totaltotal 100% 29 / 29 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
__ANON__
1.0
CRAP 1.0
« Clicker/Data/Series/HighLow.pm ↑ Summary Clicker/Decoration.pm »
1 package Chart::Clicker::Data::Series::Size;
2 4 $Chart::Clicker::Data::Series::Size::VERSION = '2.90';
3 4 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 4 extends 'Chart::Clicker::Data::Series';
6  
7 # ABSTRACT: Chart data with additional attributes for Size charts
8  
9 4 ▶use List::Util qw(min max);
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11  
12 has 'sizes' => (
13 traits => [ 'Array' ],
14 is => 'rw',
15 isa => 'ArrayRef',
16 1 ▶ default => sub { [] },
Subroutine __ANON__: called CC=1 SCAR=0.0
17 4 handles => {
18 'add_to_sizes' => 'push',
19 'size_count' => 'count',
20 'get_size' => 'get'
21 }
22 );
23  
24  
25 has max_size => (
26 is => 'ro',
27 isa => 'Num',
28 lazy => 1,
29 1 ▶ default => sub {
Subroutine __ANON__: called CC=1 SCAR=0.0
30 1 my ($self) = @_;
31 1 return max(@{ $self->sizes });
32 }
33 4 );
34  
35  
36 has min_size => (
37 is => 'ro',
38 isa => 'Num',
39 lazy => 1,
40 1 ▶ default => sub {
Subroutine __ANON__: called CC=1 SCAR=0.0
41 1 my ($self) = @_;
42 1 return min(@{ $self->sizes });
43 }
44 4 );
45  
46 4 __PACKAGE__->meta->make_immutable;
47  
48 4 ▶no Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
49  
50 4 1;
51  
52 __END__
« Clicker/Data/Series/HighLow.pm ↑ Summary Clicker/Decoration.pm »