push
travis-ci
5 of 5 new or added lines in 2 files covered. (100.0%)
718 of 909 relevant lines covered (78.99%)
5310.36 hits per line
1 |
module AnyStyle |
1✔ |
2 |
class Feature |
1✔ |
3 |
class Number < Feature |
1✔ |
4 |
def observe(token, **opts) |
1✔ |
5 |
case token
|
1,248✔ |
6 |
when /\d[\(:;]\d/ |
|
7 |
:volume
|
8✔ |
8 |
when /^97[89](\p{Pd}?\d){10}$/, |
|
9 |
/^\d(\p{Pd}?\d){9}$/
|
|
|
:isbn
|
2✔ |
11 |
when /\b(1\d|20)\d\d\b/ |
|
12 |
:year
|
57✔ |
13 |
when /^\d\d\d\d$/ |
|
14 |
:quad
|
1✔ |
15 |
when /^\d\d\d$/ |
|
16 |
:triple
|
5✔ |
17 |
when /^\d\d$/ |
|
18 |
:double
|
2✔ |
19 |
when /^\d$/ |
|
20 |
:single
|
2✔ |
21 |
when /^\d+$/ |
|
22 |
:all
|
× |
23 |
when /^\d+\p{Pd}+\d+$/ |
|
|
:range
|
3✔ |
25 |
when /^\p{Lu}[\p{Lu}\p{Pd}\/]+\d+[,.:]?$/ |
|
|
:idnum
|
5✔ |
27 |
when /\d\p{Alpha}{1,3}\b/i |
|
28 |
:ordinal
|
13✔ |
29 |
when /\d/ |
|
30 |
:numeric
|
77✔ |
31 |
when /^([IVXLDCM]+|[ivx]+)\b/ |
|
32 |
:roman
|
32✔ |
33 |
else
|
|
34 |
:none
|
1,041✔ |
35 |
end
|
|
36 |
end
|
|
37 |
end
|
|
38 |
end
|
|
39 |
end
|