File Coverage

blib/lib/Moonshine/Bootstrap/Component/Well.pm
Criterion Covered Total %
statement 15 15 100.0
branch n/a
condition 1 2 50.0
subroutine 5 5 100.0
pod n/a
total 21 22 95.4


line stmt bran cond sub pod time code
1             package Moonshine::Bootstrap::Component::Well;
2              
3 5     5   181951 use strict;
  5         17  
  5         232  
4 5     5   36 use warnings;
  5         14  
  5         439  
5              
6 5     5   706 use Moonshine::Magic;
  5         152918  
  5         39  
7 5     5   3891 use Moonshine::Bootstrap::Component;
  5         29  
  5         178  
8              
9             extends 'Moonshine::Bootstrap::Component';
10              
11             has(
12             well_spec => sub {
13             {
14             tag => { default => 'div' },
15             class_base => { default => 'well' },
16             switch_base => { default => 'well-' },
17             };
18             }
19             );
20              
21             sub well {
22 21     21   191017 my ($self) = shift;
23              
24 21   50     273 my ( $base_args, $build_args ) = $self->validate_build(
25             {
26             params => $_[0] // {},
27             spec => $self->well_spec,
28             }
29             );
30 18         246 return Moonshine::Element->new($base_args);
31             }
32              
33             1;
34              
35             __END__