File Coverage

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


line stmt bran cond sub pod time code
1             package Moonshine::Bootstrap::Component::NavbarBrand;
2              
3 7     7   247659 use Moonshine::Magic;
  7         165028  
  7         63  
4              
5             extends 'Moonshine::Bootstrap::Component';
6              
7             has(
8             navbar_brand_spec => sub {
9             {
10             tag => { default => 'a' },
11             href => { default => '#' },
12             class_base => { default => 'navbar-brand' },
13             };
14             }
15             );
16              
17             sub navbar_brand {
18 7     7   15938 my ($self) = shift;
19              
20 7   100     138 my ( $base_args, $build_args ) = $self->validate_build(
21             {
22             params => $_[0] // {},
23             spec => $self->navbar_brand_spec,
24             }
25             );
26              
27 7         127 return Moonshine::Element->new($base_args);
28             }
29              
30             1;
31              
32             __END__