forwardable 1.3.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/forwardable.rb +6 -2
- data/lib/forwardable/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: b71c98d58e860e0b8243aec9b71eb926ab0012fe8fb819fc7510ea28cd21d524
|
4
|
+
data.tar.gz: 891b5ee4d7f70b073e7fa34843986ecd5ed3b8a319d0fcad854bb91a8e77c18e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 638e29024c4ca43e8843a1e2545f6bef2e218d5016d29e52189df5b9cdff887821d607bb1bf4bbbdd501d3c6c746dc88582b1df6cdd05e7293287d1883854934
|
7
|
+
data.tar.gz: 8fd748a5b48039e6cd73922b6f8324fc60eab8f517a80b927e53170a0e22297baeb959619b4f032fb34d955d535acdbb36e04e1158351171c7242a90daa4abe6
|
data/lib/forwardable.rb
CHANGED
@@ -160,6 +160,7 @@ module Forwardable
|
|
160
160
|
# +accessor.method+. +accessor+ should be a method name, instance
|
161
161
|
# variable name, or constant name. Use the full path to the
|
162
162
|
# constant if providing the constant name.
|
163
|
+
# Returns the name of the method defined.
|
163
164
|
#
|
164
165
|
# class MyQueue
|
165
166
|
# CONST = 1
|
@@ -184,8 +185,9 @@ module Forwardable
|
|
184
185
|
|
185
186
|
# If it's not a class or module, it's an instance
|
186
187
|
mod = Module === self ? self : singleton_class
|
187
|
-
mod.module_eval(&gen)
|
188
|
+
ret = mod.module_eval(&gen)
|
188
189
|
mod.send(:ruby2_keywords, ali) if RUBY_VERSION >= '2.7'
|
190
|
+
ret
|
189
191
|
end
|
190
192
|
|
191
193
|
alias delegate instance_delegate
|
@@ -299,11 +301,13 @@ module SingleForwardable
|
|
299
301
|
# Defines a method _method_ which delegates to _accessor_ (i.e. it calls
|
300
302
|
# the method of the same name in _accessor_). If _new_name_ is
|
301
303
|
# provided, it is used as the name for the delegate method.
|
304
|
+
# Returns the name of the method defined.
|
302
305
|
def def_single_delegator(accessor, method, ali = method)
|
303
306
|
gen = Forwardable._delegator_method(self, accessor, method, ali)
|
304
307
|
|
305
|
-
instance_eval(&gen)
|
308
|
+
ret = instance_eval(&gen)
|
306
309
|
singleton_class.send(:ruby2_keywords, ali) if RUBY_VERSION >= '2.7'
|
310
|
+
ret
|
307
311
|
end
|
308
312
|
|
309
313
|
alias delegate single_delegate
|
data/lib/forwardable/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: forwardable
|
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
|
- Keiju ISHITSUKA
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-11
|
11
|
+
date: 2019-12-11 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Provides delegation of specified methods to a designated object.
|
14
14
|
email:
|