File Coverage

blib/lib/Moonshine/Bootstrap/Component/Clearfix.pm
Criterion Covered Total %
statement 15 15 100.0
branch n/a
condition 1 2 50.0
subroutine 5 5 100.0
pod 0 1 0.0
total 21 23 91.3


line stmt bran cond sub pod time code
1             package Moonshine::Bootstrap::Component::Clearfix;
2              
3 5     5   194763 use strict;
  5         13  
  5         232  
4 5     5   28 use warnings;
  5         10  
  5         334  
5              
6 5     5   616 use Moonshine::Magic;
  5         168509  
  5         39  
7 5     5   3707 use Moonshine::Bootstrap::Component;
  5         23  
  5         206  
8              
9             extends 'Moonshine::Bootstrap::Component';
10              
11             has(
12             clearfix_spec => sub {
13             {
14             tag => { default => 'div' },
15             class_base => { default => 'clearfix visible-xs-block' },
16             };
17             }
18             );
19              
20             sub clearfix {
21 2     2 0 10260 my ($self) = shift;
22              
23 2   50     28 my ( $base_args, $build_args ) = $self->validate_build(
24             {
25             params => $_[0] // {},
26             spec => $self->clearfix_spec,
27             }
28             );
29 2         36 return Moonshine::Element->new($base_args);
30             }
31              
32             1;
33              
34             __END__