File Coverage

lib/UR/Object/Value.pm
Criterion Covered Total %
statement 9 15 60.0
branch 0 4 0.0
condition n/a
subroutine 3 4 75.0
pod 0 1 0.0
total 12 24 50.0


line stmt bran cond sub pod time code
1             package UR::Object::Value;
2              
3 116     116   4027 use strict;
  116         172  
  116         3465  
4 116     116   426 use warnings;
  116         138  
  116         3188  
5 116     116   382 use UR;
  116         130  
  116         759  
6             our $VERSION = "0.46"; # UR $VERSION;
7              
8             class UR::Object::Value {
9             is => 'UR::Value',
10             is_abstract => 1,
11             subclassify_by => 'entity_class_name',
12             type_has => [
13             entity_class_name => { is => 'Text' },
14             ],
15             has => [
16             rule => { is => 'UR::BoolExpr', id_by => 'id' },
17             entity_class_name => { via => 'rule', to => 'subject_class_name' },
18             ],
19             doc => 'an unordered group of distinct UR::Objects'
20             };
21              
22             sub AUTOSUB {
23 0     0 0   my ($method,$class) = @_;
24 0           my $entity_class_name = $class;
25 0           $entity_class_name =~ s/::Value$//g;
26 0 0         return unless $entity_class_name;
27 0           my $code = $entity_class_name->can($method);
28 0 0         return $code if $code;
29             }
30              
31             1;
32