simple_enum 2.0.0.rc1 → 2.0.0.rc2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 665f3d1039443aa384654770a39563ac3d784060
4
- data.tar.gz: 44d521782b6390f95dc6b11f3d1c2f6bb570c811
3
+ metadata.gz: 1f8cd2d424c3387cd12f6c4a4e22873641f8fc1b
4
+ data.tar.gz: 0d1728690e77c485e5dc1770644248eda9e2ba50
5
5
  SHA512:
6
- metadata.gz: 200d1e0d6e1367f7f7c66ccd3380452052b3b16547e461d6050d163e1bd7416c4413139284cf4971c1d18439f6ac816a70571fc2b116ab9bbfe52c753bb7fe50
7
- data.tar.gz: 0d1238c44c50cd1b2b98d74d68d97a3e9bf4d265b35f9360cd4da59bcaace4eaa2529fa5874a614d3565b5ea5702841499864f6864ea1e1bca424fe7af81625c
6
+ metadata.gz: 916b55125dbb05aee70240b765486b4410633aca3649552d3bbc53ab3c28bacf574de4b653bb52a4e0160649bcd0b3edbada87ce4fc2c0c237b0d7f7a7ff581d
7
+ data.tar.gz: 300f0e6a4916004ea5970b2716d46244d40c83c59ebe63851047cdc04b11137abe7e5b936d5a7ae71f6754fb1517c2888abe1260f5ff85de41208211189dcf73
@@ -30,6 +30,10 @@ module SimpleEnum
30
30
  end
31
31
  alias_method :each, :each_pair
32
32
 
33
+ def keys
34
+ hash.keys
35
+ end
36
+
33
37
  def to_s
34
38
  name
35
39
  end
@@ -1,5 +1,5 @@
1
1
  module SimpleEnum
2
2
 
3
3
  # The current `SimpleEnum` version.
4
- VERSION = "2.0.0.rc1"
4
+ VERSION = "2.0.0.rc2"
5
5
  end
@@ -32,6 +32,12 @@ describe SimpleEnum::Enum do
32
32
  end
33
33
  end
34
34
 
35
+ context '#keys' do
36
+ it 'returns the keys in the order added' do
37
+ expect(subject.keys).to eq %w{male female}
38
+ end
39
+ end
40
+
35
41
  context '#each_pair (aliased to #each)' do
36
42
  it 'yields twice with #each_pair' do
37
43
  expect { |b| subject.each_pair(&b) }.to yield_control.exactly(2).times
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_enum
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.rc1
4
+ version: 2.0.0.rc2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lukas Westermann