circleci
58 of 58 new or added lines in 7 files covered. (100.0%)
170 of 171 relevant lines covered (99.42%)
3.24 hits per line
1 |
class MaybeURI |
1✔ |
2 |
pattr_initialize :raw_value
|
1✔ |
3 |
|
|
4 |
def value |
1✔ |
5 |
if uri?
|
× |
6 |
uri |
× |
7 |
else
|
|
8 |
raw_value |
× |
9 |
end
|
|
10 |
end
|
|
11 |
|
|
12 |
def uri? |
1✔ |
13 |
String === raw_value && !uri.scheme.blank? && !uri.host.blank?
|
22✔ |
14 |
end
|
|
15 |
|
|
16 |
private |
1✔ |
17 |
|
|
18 |
def uri |
1✔ |
19 |
@uri ||= RDF::URI(raw_value) |
28✔ |
20 |
end
|
|
21 |
end
|