blib/lib/UR/BoolExpr/Template/Composite.pm untested

filter: Statementstmt 0.0% 0 / 28 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 5 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 35 SCAR 6.9
CC
1
Cov
0%
get_underlying_rules_for_values
2.0
_get_for_subject_class_name_and_logic_detail
2.0
BEGIN
2.0
CRAP 2.0
1 package UR::BoolExpr::Template::Composite;
2  
3 use warnings;
4 use strict;
5 our $VERSION = "0.46"; # UR $VERSION;;
6  
7 require UR;
8  
9 UR::Object::Type->define(
10 class_name => __PACKAGE__,
11 is => ['UR::BoolExpr::Template'],
12 );
13  
14 # sub _underlying_keys {
15  
16 sub get_underlying_rules_for_values {
17 my $self = shift;
18 my @values = @_;
19 my @underlying_templates = $self->get_underlying_rule_templates();
20 my @underlying_rules;
21 for my $template (@underlying_templates) {
22 my $n = $template->_variable_value_count;
23 my $rule = $template->get_rule_for_values(splice(@values,0,$n));
24 push @underlying_rules, $rule;
25 }
26 return @underlying_rules;
27 }
28  
29 sub _get_for_subject_class_name_and_logic_detail {
30 my $class = shift;
31 my $subject_class_name = shift;
32 my $logic_detail = shift;
33 my $constant_id = shift;
34
35 my ($logic_type) = ($class =~ /^UR::BoolExpr::Template::(.*)/);
36 my $id = $class->__meta__->resolve_composite_id_from_ordered_values($subject_class_name, $logic_type, $logic_detail, $constant_id);
37
38 return $class->get($id);
39 }
40  
41 # sub get_underlying_rule_templates {
42  
43 # sub specifies_value_for {
44  
45 # evalutate_subject_and_values {
46  
47 1;
48  
49 =pod
50  
51 =head1 NAME
52  
53 UR::BoolExpr::Composite - an "and" or "or" rule
54  
55 =head1 SYNOPSIS
56  
57 @r = $r->get_underlying_rules();
58 for (@r) {
59 print $r->evaluate($c1);
60 }
61  
62 =head1 DESCRIPTION
63  
64 =head1 SEE ALSO
65  
66 UR::Object(3), UR::BoolExpr, UR::BoolExpr::Template, UR::BoolExpr::Template::And, UR::BoolExpr::Template::Or, UR::BoolExpr::Template::PropertyComparison
67  
68 =cut