utilities 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/utilities.rb +6 -1
- data/lib/version.rb +1 -1
- metadata +3 -3
data/lib/utilities.rb
CHANGED
@@ -13,9 +13,14 @@ class Range
|
|
13
13
|
end
|
14
14
|
alias_method :&, :intersection
|
15
15
|
|
16
|
+
# Verify if self is empty
|
17
|
+
def empty?
|
18
|
+
count.zero?
|
19
|
+
end
|
20
|
+
|
16
21
|
# Detect if the two ranges overlap one with the other
|
17
22
|
def overlap? range
|
18
|
-
!(self & range).
|
23
|
+
!(self & range).nil?
|
19
24
|
end
|
20
25
|
end
|
21
26
|
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: utilities
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 5
|
10
|
+
version: 0.0.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Christian Blais
|