File Coverage

blib/lib/JSON/Schema/Generator/Handler/Maybe/Lifted.pm
Criterion Covered Total %
statement 11 11 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod 0 1 0.0
total 14 15 93.3


line stmt bran cond sub pod time code
1             package JSON::Schema::Generator::Handler::Maybe::Lifted;
2              
3 2     2   9 use strict;
  2         3  
  2         45  
4 2     2   9 use warnings;
  2         3  
  2         181  
5              
6             sub process {
7 1     1 0 3   my($class, $maybe_type, $examples, $dispatch) = @_;
8 1         2   my $entity_examples = [ grep { $maybe_type->type->accepts($_) } @$examples ];
  1         4  
9               return +{
10 1         14     %{ $dispatch->($maybe_type->type, $entity_examples) },
  1         4  
11               };
12             }
13              
14             1;
15