File Coverage

blib/lib/Moonshine/Bootstrap/Component/Media.pm
Criterion Covered Total %
statement 6 6 100.0
branch n/a
condition 1 2 50.0
subroutine 2 2 100.0
pod n/a
total 9 10 90.0


line stmt bran cond sub pod time code
1             package Moonshine::Bootstrap::Component::Media;
2              
3 6     6   286813 use Moonshine::Magic;
  6         179630  
  6         48  
4              
5             extends (
6             'Moonshine::Bootstrap::Component',
7             'Moonshine::Bootstrap::Component::MediaObject',
8             );
9              
10             has(
11             media_spec => sub {
12             {
13             tag => { default => 'div' },
14             class_base => { default => 'media' },
15             };
16             }
17             );
18              
19             sub media {
20 6     6   13938 my ($self) = shift;
21              
22 6   50     72 my ( $base_args, $build_args ) = $self->validate_build(
23             {
24             params => $_[0] // {},
25             spec => $self->media_spec,
26             }
27             );
28              
29 6         96 return Moonshine::Element->new($base_args);
30             }
31              
32             1;
33              
34             __END__