time-interval 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1f07fe3b685cf4deb569c85716903b92d1b5011d
4
- data.tar.gz: 5057c93856e759678b3e09de12cdc6bf74740206
3
+ metadata.gz: 19332affedd3c797819348596303bb4acf65afe1
4
+ data.tar.gz: de62b70cbd528c98562a9ec1acbef56663d3c925
5
5
  SHA512:
6
- metadata.gz: d175b9c1e8a6a150d7d523d9656297fcf8895bbad59e848fce5f18ac4ca6b1ba5684f086ea572298b06fd200614c39c64882ba4ef321cd2427110eb869a9364d
7
- data.tar.gz: 8277a184873b26605553041ca0c3a8b2d839f6b44b659bcb23aec0b28135e3c6c7f7791ab59f21324be99655cf69ec8a9646f2f506aeca084aac42033c2676a3
6
+ metadata.gz: 76f88a28295ac79cd0e3e03934b26b432e1084a8b349a238ca7e51d710e0d5b190476f9eb0a4af0b9371ad85e7273c8d0c9dc9482ad7ecc392328804e5ecfdac
7
+ data.tar.gz: 087bde9f32c01632a48a792391500ff8b7d981d9c946eea5b68f44049775b3874d4054913a6bca33c058736fb591d94d929ded0f58b219653b4d3dfd264f27e6
@@ -18,6 +18,14 @@ module TimeInterval
18
18
  @end_time = end_time
19
19
  end
20
20
 
21
+ def ==(other)
22
+ return false unless other.is_a? TimePair
23
+
24
+ start_time == other.start_time && end_time == other.end_time
25
+ end
26
+
27
+ alias_method :eql?, :==
28
+
21
29
  def iso8601
22
30
  "#{start_time.iso8601}/#{end_time.iso8601}"
23
31
  end
@@ -31,6 +31,14 @@ module TimeInterval
31
31
  @forwards = forwards
32
32
  end
33
33
 
34
+ def ==(other)
35
+ return false unless other.is_a? TimeWithDuration
36
+
37
+ start_time == other.start_time && end_time == other.end_time
38
+ end
39
+
40
+ alias_method :eql?, :==
41
+
34
42
  def end_time
35
43
  if forwards?
36
44
  duration.add_to start_time
@@ -1,3 +1,3 @@
1
1
  module TimeInterval
2
- VERSION = '0.0.3'
2
+ VERSION = '0.0.4'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: time-interval
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastian Edwards
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-11 00:00:00.000000000 Z
11
+ date: 2015-02-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler