File Coverage

blib/lib/WWW/Hetzner/Cloud/ServerType.pm
Criterion Covered Total %
statement 6 8 75.0
branch n/a
condition n/a
subroutine 2 3 66.6
pod 1 1 100.0
total 9 12 75.0


line stmt bran cond sub pod time code
1             package WWW::Hetzner::Cloud::ServerType;
2             # ABSTRACT: Hetzner Cloud ServerType object
3              
4             our $VERSION = '0.100';
5              
6 25     25   147 use Moo;
  25         48  
  25         140  
7 25     25   8965 use namespace::clean;
  25         56  
  25         183  
8              
9              
10             has _client => (
11             is => 'ro',
12             required => 1,
13             weak_ref => 1,
14             init_arg => 'client',
15             );
16              
17             has id => ( is => 'ro' );
18              
19              
20             has name => ( is => 'ro' );
21              
22              
23             has description => ( is => 'ro' );
24              
25              
26             has cores => ( is => 'ro' );
27              
28              
29             has memory => ( is => 'ro' );
30              
31              
32             has disk => ( is => 'ro' );
33              
34              
35             has cpu_type => ( is => 'ro' );
36              
37              
38             has architecture => ( is => 'ro' );
39              
40              
41             has deprecated => ( is => 'ro' );
42              
43              
44             sub data {
45 0     0 1   my ($self) = @_;
46             return {
47 0           id => $self->id,
48             name => $self->name,
49             description => $self->description,
50             cores => $self->cores,
51             memory => $self->memory,
52             disk => $self->disk,
53             cpu_type => $self->cpu_type,
54             architecture => $self->architecture,
55             deprecated => $self->deprecated,
56             };
57             }
58              
59              
60              
61             1.
62              
63             __END__