lib/UR/Value/Boolean/View/Default/Text.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 9 | 9 | 100.0 |
branch | 2 | 2 | 100.0 |
condition | 2 | 3 | 66.6 |
subroutine | 3 | 3 | 100.0 |
pod | n/a | ||
total | 16 | 17 | 94.1 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package UR::Value::Boolean::View::Default::Text; | ||||||
2 | |||||||
3 | 1 | 1 | 15 | use strict; | |||
1 | 2 | ||||||
1 | 31 | ||||||
4 | 1 | 1 | 4 | use warnings; | |||
1 | 1 | ||||||
1 | 126 | ||||||
5 | require UR; | ||||||
6 | our $VERSION = "0.46"; # UR $VERSION; | ||||||
7 | |||||||
8 | class UR::Value::Boolean::View::Default::Text { | ||||||
9 | is => 'UR::Object::View::Default::Text' | ||||||
10 | }; | ||||||
11 | |||||||
12 | |||||||
13 | sub _generate_content { | ||||||
14 | 5 | 5 | 5 | my $self = shift; | |||
15 | 5 | 18 | my $subject = $self->subject(); | ||||
16 | 5 | 100 | 66 | 14 | return $subject && $subject->id ? "1" : "0"; | ||
17 | } | ||||||
18 | |||||||
19 | 1; |