enumerize 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +5 -0
- data/lib/enumerize/base.rb +0 -2
- data/lib/enumerize/version.rb +1 -1
- data/test/base_test.rb +0 -7
- metadata +3 -3
data/CHANGELOG.md
CHANGED
data/lib/enumerize/base.rb
CHANGED
@@ -12,8 +12,6 @@ module Enumerize
|
|
12
12
|
|
13
13
|
module ClassMethods
|
14
14
|
def enumerize(name, options={})
|
15
|
-
raise ArgumentError, "Enumerized attribute #{name} is already defined" if enumerized_attributes[name]
|
16
|
-
|
17
15
|
attr = Attribute.new(self, name, options)
|
18
16
|
enumerized_attributes << attr
|
19
17
|
|
data/lib/enumerize/version.rb
CHANGED
data/test/base_test.rb
CHANGED
@@ -179,11 +179,4 @@ describe Enumerize::Base do
|
|
179
179
|
object.instance_variable_get(:@foo).must_equal 2
|
180
180
|
object.foo.must_equal 'b'
|
181
181
|
end
|
182
|
-
|
183
|
-
it 'raises exception when enumerized attribute is already defined' do
|
184
|
-
klass.enumerize :foo, in: %w(a b)
|
185
|
-
proc {
|
186
|
-
klass.enumerize :foo, in: %w(a b)
|
187
|
-
}.must_raise ArgumentError
|
188
|
-
end
|
189
182
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: enumerize
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-05-
|
12
|
+
date: 2013-05-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
@@ -89,7 +89,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
89
89
|
requirements:
|
90
90
|
- - ! '>='
|
91
91
|
- !ruby/object:Gem::Version
|
92
|
-
hash:
|
92
|
+
hash: 2431695080895268301
|
93
93
|
version: '0'
|
94
94
|
segments:
|
95
95
|
- 0
|