File Coverage

blib/lib/Neo4j/Bolt/Relationship.pm
Criterion Covered Total %
statement 17 17 100.0
branch 2 2 100.0
condition n/a
subroutine 4 4 100.0
pod 1 1 100.0
total 24 24 100.0


line stmt bran cond sub pod time code
1             package Neo4j::Bolt::Relationship;
2             # ABSTRACT: Representation of Neo4j Relationship
3              
4             $Neo4j::Bolt::Relationship::VERSION = '0.4201';
5              
6 6     6   42 use strict;
  6         11  
  6         187  
7 6     6   34 use warnings;
  6         9  
  6         159  
8              
9 6     6   29 use parent 'Neo4j::Types::Relationship';
  6         13  
  6         29  
10              
11             sub as_simple {
12 2     2 1 132 my ($self) = @_;
13            
14 2 100       18 my %simple = defined $self->{properties} ? %{$self->{properties}} : ();
  1         6  
15 2         6 $simple{_relationship} = $self->{id};
16 2         5 $simple{_start} = $self->{start};
17 2         3 $simple{_end} = $self->{end};
18 2         5 $simple{_type} = $self->{type};
19 2         10 return \%simple;
20             }
21              
22             1;
23              
24             __END__