File Coverage

blib/lib/PLS/Server/Method/CompletionItem.pm
Criterion Covered Total %
statement 9 14 64.2
branch 0 2 0.0
condition n/a
subroutine 3 4 75.0
pod 0 1 0.0
total 12 21 57.1


line stmt bran cond sub pod time code
1             package PLS::Server::Method::CompletionItem;
2              
3 9     9   46 use strict;
  9         18  
  9         224  
4 9     9   36 use warnings;
  9         24  
  9         223  
5              
6 9     9   3193 use PLS::Server::Request::CompletionItem::Resolve;
  9         28  
  9         932  
7              
8             =head1 NAME
9              
10             This module redirects requests beginning with C<completionItem/> to the
11             appropriate subclass of L<PLS::Server::Request>.
12              
13             Requests currently implemented:
14              
15             =over
16              
17             =item completionItem/resolve - L<https://microsoft.github.io/language-server-protocol/specifications/specification-current/#completionItem_resolve>
18              
19             L<PLS::Server::Request::CompletionItem::Resolve>
20              
21             =back
22              
23             =cut
24              
25             sub get_request
26             {
27 0     0 0   my ($request) = @_;
28              
29 0           my (undef, $method) = split '/', $request->{method};
30              
31 0 0         if ($method eq 'resolve')
32             {
33 0           return PLS::Server::Request::CompletionItem::Resolve->new($request);
34             }
35              
36 0           return;
37             } ## end sub get_request
38              
39             1;