def_enum_helper 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/def_enum_helper/version.rb +1 -1
- data/lib/def_enum_helper.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f99a30403997eaeda0c3e164bb9d8692abe6e68b
|
4
|
+
data.tar.gz: 1d0e7b08c52269b6659bb5011f0131ad4ba2cda0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ba0af7fb328ca8491af01f85ddc4a967b5d3b4834cb2f2d9c18896c00fc316785d3242bc383576686ab8f10180f87b1afb465c5830733801fce9b49d1e9c035
|
7
|
+
data.tar.gz: 12309cb56c5d64971d8f339d478cd3f32b4a04314df9e3f6c8df1f25f884f243d642fa02371819b4a8d25e3015b55e112583eaf69289a6b46ec32402d61e9e99
|
data/lib/def_enum_helper.rb
CHANGED
@@ -75,6 +75,7 @@ end
|
|
75
75
|
|
76
76
|
def define_iterator_methods(m, enum_index_hash)
|
77
77
|
m.define_singleton_method(:each) { |&blk| enum_index_hash.each_value { |v| blk.call(v) } }
|
78
|
+
m.define_singleton_method(:map) { |&blk| enum_index_hash.values.map { |v| blk.call(v) } }
|
78
79
|
|
79
80
|
m.define_singleton_method(:all) { enum_index_hash.values }
|
80
81
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: def_enum_helper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Charles Zhang
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-05-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|