enumerative 1.2.1 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -30,7 +30,10 @@
30
30
 
31
31
  end
32
32
 
33
- def initialize( key )
33
+ def initialize( key_or_hash )
34
+ key = key_or_hash.is_a?( Hash ) ?
35
+ (key_or_hash['key'] || key_or_hash[:key]) :
36
+ key_or_hash
34
37
  @key = key.to_s.try( :dup ).try( :freeze )
35
38
  end
36
39
 
@@ -1,5 +1,5 @@
1
1
  module Enumerative
2
2
 
3
- VERSION = "1.2.1"
3
+ VERSION = "1.3.0"
4
4
 
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enumerative
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.3.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-10-16 00:00:00.000000000 Z
13
+ date: 2013-11-22 00:00:00.000000000 Z
14
14
  dependencies: []
15
15
  description: Tools for defining and using enumerations.
16
16
  email: