enum_ish 1.3.0 → 1.3.1
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/definer.rb +2 -2
- data/lib/enum_ish/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 17516af44e8b97d4f175f6ed2059aab9ca70642a4df8ddf105c6986cbe8da43f
|
4
|
+
data.tar.gz: 91de1ab4345f33e60812fa52aca7441e41f7aa8015024db7d28a1cbd3120e79e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 85d4dcfbcc2fcdb7da3df9c763d772de245949743a1826850fa24d90457b1e480061cd95ad6c42336a4edba5246e02fd6f29d5821415de936c507cb9aedda4cd
|
7
|
+
data.tar.gz: fe398188119a564f482badffb665fbcabe0607975b9936f9c363aa7fbb11c2d765d8758ee70dcce5446f53bfa07f910d08662901f7a6485765fd6129c6a129f3
|
data/CHANGELOG.md
CHANGED
data/lib/enum_ish/definer.rb
CHANGED
@@ -49,15 +49,15 @@ module EnumIsh
|
|
49
49
|
mod = Module.new
|
50
50
|
mod.module_eval do
|
51
51
|
define_method :initialize do |*args|
|
52
|
+
super(*args)
|
52
53
|
if respond_to?(enum.name) && public_send(enum.name).nil?
|
53
54
|
default = enum.setting[:default]
|
54
55
|
default = instance_exec(&default) if default.kind_of?(Proc)
|
55
56
|
public_send("#{enum.name}=", default)
|
56
57
|
end
|
57
|
-
super(*args)
|
58
58
|
end
|
59
59
|
end
|
60
|
-
@klass.
|
60
|
+
@klass.send(:include, mod)
|
61
61
|
end
|
62
62
|
|
63
63
|
def define_accessor(enum)
|
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.3.
|
4
|
+
version: 1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yoshikazu Kaneta
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-05-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -141,7 +141,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
141
141
|
- !ruby/object:Gem::Version
|
142
142
|
version: '0'
|
143
143
|
requirements: []
|
144
|
-
rubygems_version: 3.
|
144
|
+
rubygems_version: 3.1.2
|
145
145
|
signing_key:
|
146
146
|
specification_version: 4
|
147
147
|
summary: A ruby and rails extension to generate enum-like methods
|