rep 0.0.3 → 0.0.4
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.
- data/lib/rep.rb +11 -9
- data/lib/rep/version.rb +1 -1
- metadata +1 -1
data/lib/rep.rb
CHANGED
@@ -37,6 +37,17 @@ module Rep
|
|
37
37
|
klass.extend Forwardable
|
38
38
|
klass.extend ClassMethods
|
39
39
|
klass.instance_eval {
|
40
|
+
# Translate for ActiveSupport, the jerk
|
41
|
+
if method(:delegate).arity == -1
|
42
|
+
class << self
|
43
|
+
def delegate(opts = {})
|
44
|
+
methods, object_name = opts.to_a.first
|
45
|
+
args = methods.concat([:to => object_name])
|
46
|
+
super(*args)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
40
51
|
class << self
|
41
52
|
unless defined?(delegate)
|
42
53
|
def delegate(opts = {})
|
@@ -56,15 +67,6 @@ module Rep
|
|
56
67
|
include HashieSupport
|
57
68
|
end
|
58
69
|
end
|
59
|
-
|
60
|
-
# Translate for ActiveSupport, the jerk
|
61
|
-
if method(:delegate).arity == -1
|
62
|
-
def delegate(opts = {})
|
63
|
-
methods, object_name = opts.to_a.first
|
64
|
-
args = methods.concat([:to => object_name])
|
65
|
-
super(*args)
|
66
|
-
end
|
67
|
-
end
|
68
70
|
}
|
69
71
|
end
|
70
72
|
|
data/lib/rep/version.rb
CHANGED