lib/WWW/Hetzner/Robot/Key.pm

filter: Statementstmt 77.7% 14 / 18 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 2 / 4 Podpod 100% 2 / 2 totaltotal 75.0% 18 / 24 CC 1 SCAR 4.1
CC
1
Cov
78%
delete
2.0
update
2.0
BEGIN
1.0
CRAP 1.5
« lib/WWW/Hetzner/Robot.pm ↑ Summary lib/WWW/Hetzner/Robot/API/IPs.pm »
1 package WWW::Hetzner::Robot::Key;
2 # ABSTRACT: Hetzner Robot SSH Key entity
3  
4 24 our $VERSION = '0.100';
5  
6 24 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 24 ▶use namespace::clean;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 24 has client => (
10 is => 'ro',
11 required => 1,
12 weak_ref => 1,
13 );
14  
15 24 has name => ( is => 'rw', required => 1 );
16  
17  
18 24 has fingerprint => ( is => 'ro', required => 1 );
19  
20  
21 24 has type => ( is => 'ro' );
22  
23  
24 24 has size => ( is => 'ro' );
25  
26  
27 24 has data => ( is => 'ro' );
28  
29  
30 sub delete {
31 0 ▶ my ($self) = @_;
Subroutine delete: not called CC=1 SCAR=6.9
Pod documented
32 0 return $self->client->delete("/key/" . $self->fingerprint);
33 }
34  
35  
36 sub update {
37 0 ▶ my ($self) = @_;
Subroutine update: not called CC=1 SCAR=6.9
Pod documented
38 0 return $self->client->post("/key/" . $self->fingerprint, {
39 name => $self->name,
40 });
41 }
42  
43  
44  
45 24 1.
46  
47 __END__
« lib/WWW/Hetzner/Robot.pm ↑ Summary lib/WWW/Hetzner/Robot/API/IPs.pm »