circleci
9 of 9 new or added lines in 1 file covered. (100.0%)
15 of 3514 relevant lines covered (0.43%)
0.0 hits per line
1 |
class PolymorphicTermRepository |
× |
2 |
attr_reader :repository_type
|
× |
3 |
|
× |
4 |
def initialize(repository_type) |
× |
5 |
@repository_type = repository_type
|
× |
6 |
end
|
× |
7 |
|
× |
8 |
def new(id) |
× |
9 |
repository(id).new(id) |
× |
10 |
end
|
× |
11 |
|
× |
12 |
def find(id) |
× |
13 |
repository(id).find(id) |
× |
14 |
end
|
× |
15 |
|
× |
16 |
def exists?(id) |
× |
17 |
repository(id).exists?(id) |
× |
18 |
end
|
× |
19 |
|
× |
20 |
private |
× |
21 |
|
× |
22 |
def repository(id) |
× |
23 |
return repository_type unless repository_type.nil? |
× |
24 |
|
× |
25 |
term = Term.find(id)
|
× |
26 |
term.term_type |
× |
27 |
end
|
× |
28 |
|
× |
29 |
end
|
× |