nice_enum 0.1.2 → 0.1.3

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.
Files changed (3) hide show
  1. data/README.rdoc +1 -1
  2. data/lib/nice_enum.rb +6 -0
  3. metadata +2 -2
data/README.rdoc CHANGED
@@ -38,7 +38,7 @@ different to_s method. Otherwise the classes are functionally identical.
38
38
  Of course, an enum can use anything as it's value type, not only integers.
39
39
  The value type must only provide a <=> operator.
40
40
 
41
- Up-To-Date documentation is avaiable {at rubydoc.info}[http://rubydoc.info/github/raphaelr/nice-enum/master/frames].
41
+ Up-To-Date documentation is avaiable {at rubydoc.info}[http://rubydoc.info/github/raphaelr/nice_enum/master/frames].
42
42
 
43
43
  = Installation
44
44
 
data/lib/nice_enum.rb CHANGED
@@ -45,6 +45,12 @@ class Enum
45
45
  return value <=> other
46
46
  end
47
47
 
48
+ # Returns whether the value of +self+ and the value of +other+ are equal.
49
+ def eql?(other)
50
+ other = other.value if other.is_a? self.class
51
+ return value.eql?(other)
52
+ end
53
+
48
54
  # Returns the hashcode of +value+.
49
55
  def hash
50
56
  value.hash
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 2
9
- version: 0.1.2
8
+ - 3
9
+ version: 0.1.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Raphael Robatsch