File Coverage

blib/lib/Moonshine/Bootstrap/Component/Row.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::Row;
2              
3 5     5   205018 use strict;
  5         14  
  5         267  
4 5     5   29 use warnings;
  5         12  
  5         393  
5              
6 5     5   534 use Moonshine::Magic;
  5         158636  
  5         38  
7 5     5   4079 use Moonshine::Bootstrap::Component;
  5         27  
  5         169  
8              
9             extends 'Moonshine::Bootstrap::Component';
10              
11             has(
12             row_spec => sub {
13             {
14             tag => { default => 'div' },
15             row => { default => 1 },
16             };
17             }
18             );
19              
20             sub row {
21 2     2   324 my ($self) = shift;
22              
23 2   50     24 my ( $base_args, $build_args ) = $self->validate_build(
24             {
25             params => $_[0] // {},
26             spec => $self->row_spec,
27             }
28             );
29 2         34 return Moonshine::Element->new($base_args);
30             }
31              
32             1;
33              
34             __END__