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/Storage/API/Actions.pm ↑ Summary lib/WWW/Hetzner/Storage/StorageBox.pm »
1 package WWW::Hetzner::Robot::Key;
2 # ABSTRACT: Hetzner Robot SSH Key entity
3  
4 58 our $VERSION = '0.102';
5  
6 58 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 58 ▶use namespace::clean;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 58 has client => (
10 is => 'ro',
11 required => 1,
12 weak_ref => 1,
13 );
14  
15 58 has name => ( is => 'rw', required => 1 );
16  
17  
18 58 has fingerprint => ( is => 'ro', required => 1 );
19  
20  
21 58 has type => ( is => 'ro' );
22  
23  
24 58 has size => ( is => 'ro' );
25  
26  
27 58 has data => ( is => 'ro' );
28  
29  
30 0 ▶sub delete {
Subroutine delete: not called CC=1 SCAR=6.9
Pod documented
31 0 my ($self) = @_;
32 0 return $self->client->delete("/key/" . $self->fingerprint);
33 }
34  
35  
36 0 ▶sub update {
Subroutine update: not called CC=1 SCAR=6.9
Pod documented
37 0 my ($self) = @_;
38 0 return $self->client->post("/key/" . $self->fingerprint, {
39 name => $self->name,
40 });
41 }
42  
43  
44  
45 58 1.
46  
47 __END__
« lib/WWW/Hetzner/Storage/API/Actions.pm ↑ Summary lib/WWW/Hetzner/Storage/StorageBox.pm »