semantic_range 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/semantic_range/range.rb +5 -0
- data/lib/semantic_range/version.rb +1 -1
- data/lib/semantic_range.rb +3 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 40689a4a60d1676915d3c80166fa016fed599e9e
|
4
|
+
data.tar.gz: a6797c03b699280fbb46196f83b6b9d29de102e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 227c788ef4eab62cb0458ce01d21d31e392f17d5b5eba966d9269cd14d2e8a669d5d9df99d9afad7da4c08525f10729768a13a45ee22e6d5ed30f7af68db2da1
|
7
|
+
data.tar.gz: 8de84d61c1823fddc13d53ce579e5838289675c7e3f8cac392ab9ea479bdc25b16dd7d79a445e0f956be1ecb94f035ca97e074b1a4e530bf45f55c6aa33682bb
|
data/lib/semantic_range/range.rb
CHANGED
@@ -6,6 +6,7 @@ module SemanticRange
|
|
6
6
|
@raw = range
|
7
7
|
@loose = loose
|
8
8
|
split = range.split(/\s*\|\|\s*/)
|
9
|
+
split = ['', ''] if range == '||'
|
9
10
|
split = [''] if split == []
|
10
11
|
@set = split.map do |range|
|
11
12
|
parse_range(range.strip)
|
@@ -24,6 +25,10 @@ module SemanticRange
|
|
24
25
|
@raw
|
25
26
|
end
|
26
27
|
|
28
|
+
def range
|
29
|
+
@range
|
30
|
+
end
|
31
|
+
|
27
32
|
def format
|
28
33
|
@range = @set.map do |comps|
|
29
34
|
comps.join(' ').strip
|
data/lib/semantic_range.rb
CHANGED