forwardablex 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/HISTORY.md +4 -0
- data/lib/forwardablex.rb +1 -1
- data/lib/forwardablex/version.rb +1 -1
- data/test/spec_forwardablex.rb +17 -17
- metadata +3 -3
data/HISTORY.md
CHANGED
data/lib/forwardablex.rb
CHANGED
data/lib/forwardablex/version.rb
CHANGED
data/test/spec_forwardablex.rb
CHANGED
@@ -20,9 +20,9 @@ class XForwarder < Forwarder
|
|
20
20
|
forward :@rec, :m1
|
21
21
|
forward :@rec, :m1, :mm1
|
22
22
|
forward! :@rec, :m2, :m3
|
23
|
-
forward Proc.new{
|
24
|
-
forward Proc.new{
|
25
|
-
forward! Proc.new{
|
23
|
+
forward Proc.new{@rec}, :m4
|
24
|
+
forward Proc.new{@rec}, :m4, :mm4
|
25
|
+
forward! Proc.new{@rec}, :m5, :m6
|
26
26
|
forward Receiver.new, :m7
|
27
27
|
forward Receiver.new, :m7, :mm7
|
28
28
|
forward! Receiver.new, :m8, :m9
|
@@ -32,9 +32,9 @@ class DefDelegatorForwarder < Forwarder
|
|
32
32
|
def_delegator :@rec, :m1
|
33
33
|
def_delegator :@rec, :m1, :mm1
|
34
34
|
def_delegators :@rec, :m2, :m3
|
35
|
-
def_delegator Proc.new{
|
36
|
-
def_delegator Proc.new{
|
37
|
-
def_delegators Proc.new{
|
35
|
+
def_delegator Proc.new{@rec}, :m4
|
36
|
+
def_delegator Proc.new{@rec}, :m4, :mm4
|
37
|
+
def_delegators Proc.new{@rec}, :m5, :m6
|
38
38
|
def_delegator Receiver.new, :m7
|
39
39
|
def_delegator Receiver.new, :m7, :mm7
|
40
40
|
def_delegators Receiver.new, :m8, :m9
|
@@ -44,9 +44,9 @@ class DefInstanceDelegatorForwarder < Forwarder
|
|
44
44
|
def_instance_delegator :@rec, :m1
|
45
45
|
def_instance_delegator :@rec, :m1, :mm1
|
46
46
|
def_instance_delegators :@rec, :m2, :m3
|
47
|
-
def_instance_delegator Proc.new{
|
48
|
-
def_instance_delegator Proc.new{
|
49
|
-
def_instance_delegators Proc.new{
|
47
|
+
def_instance_delegator Proc.new{@rec}, :m4
|
48
|
+
def_instance_delegator Proc.new{@rec}, :m4, :mm4
|
49
|
+
def_instance_delegators Proc.new{@rec}, :m5, :m6
|
50
50
|
def_instance_delegator Receiver.new, :m7
|
51
51
|
def_instance_delegator Receiver.new, :m7, :mm7
|
52
52
|
def_instance_delegators Receiver.new, :m8, :m9
|
@@ -55,8 +55,8 @@ end
|
|
55
55
|
class DelegateForwarder < Forwarder
|
56
56
|
delegate :m1 => :@rec
|
57
57
|
delegate [:m2, :m3] => :@rec
|
58
|
-
delegate :m4 => Proc.new{
|
59
|
-
delegate [:m5, :m6] => Proc.new{
|
58
|
+
delegate :m4 => Proc.new{@rec}
|
59
|
+
delegate [:m5, :m6] => Proc.new{@rec}
|
60
60
|
delegate :m7 => Receiver.new
|
61
61
|
delegate [:m8, :m9] => Receiver.new
|
62
62
|
end
|
@@ -66,9 +66,9 @@ xforwarder = Forwarder.new("xforwarder").tap do |obj|
|
|
66
66
|
obj.forward :@rec, :m1
|
67
67
|
obj.forward :@rec, :m1, :mm1
|
68
68
|
obj.forward! :@rec, :m2, :m3
|
69
|
-
obj.forward Proc.new{
|
70
|
-
obj.forward Proc.new{
|
71
|
-
obj.forward! Proc.new{
|
69
|
+
obj.forward Proc.new{@rec}, :m4
|
70
|
+
obj.forward Proc.new{@rec}, :m4, :mm4
|
71
|
+
obj.forward! Proc.new{@rec}, :m5, :m6
|
72
72
|
obj.forward Receiver.new, :m7
|
73
73
|
obj.forward Receiver.new, :m7, :mm7
|
74
74
|
obj.forward! Receiver.new, :m8, :m9
|
@@ -79,9 +79,9 @@ singletonforwarder = Forwarder.new("singletonforwarder").tap do |obj|
|
|
79
79
|
obj.def_singleton_delegator :@rec, :m1
|
80
80
|
obj.def_singleton_delegator :@rec, :m1, :mm1
|
81
81
|
obj.def_singleton_delegators :@rec, :m2, :m3
|
82
|
-
obj.def_singleton_delegator Proc.new{
|
83
|
-
obj.def_singleton_delegator Proc.new{
|
84
|
-
obj.def_singleton_delegators Proc.new{
|
82
|
+
obj.def_singleton_delegator Proc.new{@rec}, :m4
|
83
|
+
obj.def_singleton_delegator Proc.new{@rec}, :m4, :mm4
|
84
|
+
obj.def_singleton_delegators Proc.new{@rec}, :m5, :m6
|
85
85
|
obj.def_singleton_delegator Receiver.new, :m7
|
86
86
|
obj.def_singleton_delegator Receiver.new, :m7, :mm7
|
87
87
|
obj.def_singleton_delegators Receiver.new, :m8, :m9
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: forwardablex
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
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-04-
|
12
|
+
date: 2013-04-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bacon
|
@@ -96,7 +96,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
96
96
|
version: '0'
|
97
97
|
requirements: []
|
98
98
|
rubyforge_project:
|
99
|
-
rubygems_version: 1.8.
|
99
|
+
rubygems_version: 1.8.25
|
100
100
|
signing_key:
|
101
101
|
specification_version: 3
|
102
102
|
summary: Forwardable extension
|