push
travis-ci
7 of 7 new or added lines in 1 file covered. (100.0%)
508 of 622 relevant lines covered (81.67%)
28869.68 hits per line
1 |
module AnyStyle |
1✔ |
2 |
class Feature |
1✔ |
3 |
class Number < Feature |
1✔ |
4 |
def observe(token, *args) |
1✔ |
5 |
case token
|
1,341✔ |
6 |
when /\d[\(\.:;]\d/ |
|
|
:volume
|
5✔ |
8 |
when /\b(1\d|20)\d\d\b/ |
|
9 |
:year
|
31✔ |
10 |
when /\d[—–-]+\d/ |
|
|
:range
|
16✔ |
12 |
when /^\d\d\d\d$/ |
|
|
:quad
|
× |
14 |
when /^\d\d\d$/ |
|
|
:triple
|
5✔ |
16 |
when /^\d\d$/ |
|
|
:double
|
35✔ |
18 |
when /^\d$/ |
|
|
:single
|
7✔ |
20 |
when /^\d+$/ |
|
|
:all
|
1✔ |
22 |
when /^\d+[\d-]+$/ |
|
23 |
:serial
|
× |
24 |
when /\d\p{Alpha}{1,3}\b/i |
|
25 |
:ordinal
|
12✔ |
26 |
when /\d/ |
|
27 |
:numeric
|
27✔ |
28 |
when /^([IVXLDCM]+|[ivx]+)\b/ |
|
29 |
:roman
|
26✔ |
30 |
else
|
|
31 |
:none
|
1,176✔ |
32 |
end
|
|
33 |
end
|
|
34 |
end
|
|
35 |
end
|
|
36 |
end
|