enum_ish 1.2.2 → 1.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/enum_ish.rb +6 -3
- data/lib/enum_ish/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 58df4091edebc5965ce060bd1342f7088f4749aaa18977c76655b44fa823245d
|
4
|
+
data.tar.gz: 3e97c949be6dc3a88bc03aa20fd5317e681cc68681857581bc9d24abc0fcb38c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a08c825b4b4e77c904f77cf5088026d34dd66439c9553a47cce1abecc4dd7d52cc9514c3b48f9fab81d7bef4263bd0eb5e3cea34afdbbc446513e672a5f0276
|
7
|
+
data.tar.gz: 62bd16fd0c155a7ca5144be68fb12d3b413996ce1a316caf70ede933842ce757d315054f47641d6a9de5b2dd1b1cc4744745c735a845c9cece3550d465e53622
|
data/CHANGELOG.md
CHANGED
data/lib/enum_ish.rb
CHANGED
@@ -11,9 +11,8 @@ module EnumIsh
|
|
11
11
|
def enum_ish(name, map, config = {})
|
12
12
|
enum = Enum.new(name, map, config)
|
13
13
|
|
14
|
-
self.
|
15
|
-
self._enum_ish_enums
|
16
|
-
self._enum_ish_enums << enum
|
14
|
+
self._enum_ish_enums ||= {}
|
15
|
+
self._enum_ish_enums[name.to_sym] = enum
|
17
16
|
|
18
17
|
if defined?(ActiveRecord::Base) && self.ancestors.include?(ActiveRecord::Base)
|
19
18
|
ActiveRecordDefiner.new(self).define(enum)
|
@@ -21,4 +20,8 @@ module EnumIsh
|
|
21
20
|
Definer.new(self).define(enum)
|
22
21
|
end
|
23
22
|
end
|
23
|
+
|
24
|
+
def self.extended(klass)
|
25
|
+
klass.class_attribute :_enum_ish_enums
|
26
|
+
end
|
24
27
|
end
|
data/lib/enum_ish/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: enum_ish
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yoshikazu Kaneta
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-10-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|