lib/UR/BoolExpr/Template/Composite.pm

filter: Statementstmt 38.4% 10 / 26 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 2 / 4 Podpod 0.0% 0 / 1 totaltotal 38.7% 12 / 31 CC 2 SCAR 11.6
CC
2
Cov
38%
get_underlying_rules_for_values
6.0
_get_for_subject_class_name_and_logic_detail
2.0
BEGIN
1.0
CRAP 3.2
« blib/lib/UR/Object/View/Static/Html.pm ↑ Summary blib/lib/UR/Namespace/Command/Show/Properties.pm »
1 package UR::BoolExpr::Template::Composite;
2  
3 266 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 266 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 266 our $VERSION = "0.47"; # UR $VERSION;
6  
7 266 require UR;
8  
9 266 UR::Object::Type->define(
10 class_name => __PACKAGE__,
11 is => ['UR::BoolExpr::Template'],
12 );
13  
14 # sub _underlying_keys {
15  
16 0 ▶sub get_underlying_rules_for_values {
Subroutine get_underlying_rules_for_values: not called CC=2 SCAR=17.9
Pod undocumented
17 0 my $self = shift;
18 0 my @values = @_;
19 0 my @underlying_templates = $self->get_underlying_rule_templates();
20 0 my @underlying_rules;
21 0 for my $template (@underlying_templates) {
22 0 my $n = $template->_variable_value_count;
23 0 my $rule = $template->get_rule_for_values(splice(@values,0,$n));
24 0 push @underlying_rules, $rule;
25 }
26 0 return @underlying_rules;
27 }
28  
29 0 ▶sub _get_for_subject_class_name_and_logic_detail {
Subroutine _get_for_subject_class_name_and_logic_detail: not called CC=1 SCAR=6.9
30 0 my $class = shift;
31 0 my $subject_class_name = shift;
32 0 my $logic_detail = shift;
33 0 my $constant_id = shift;
34
35 0 my ($logic_type) = ($class =~ /^UR::BoolExpr::Template::(.*)/);
36 0 my $id = $class->__meta__->resolve_composite_id_from_ordered_values($subject_class_name, $logic_type, $logic_detail, $constant_id);
37
38 0 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 266 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
« blib/lib/UR/Object/View/Static/Html.pm ↑ Summary blib/lib/UR/Namespace/Command/Show/Properties.pm »