namebox 0.2.1 → 0.2.2
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/namebox.rb +3 -6
- metadata +1 -1
data/lib/namebox.rb
CHANGED
@@ -191,6 +191,9 @@ class Namebox
|
|
191
191
|
@classes |= singleton_classes
|
192
192
|
@modules |= singleton_classes
|
193
193
|
|
194
|
+
# permits to call the previous (_old) version of the method.
|
195
|
+
@modules.each { |m| m.send(:include, Namebox::Old) unless m == Namebox::Old }
|
196
|
+
|
194
197
|
# save preexisting methods and included modules
|
195
198
|
inc_mods_before = get_included_modules
|
196
199
|
methods_before = get_methods
|
@@ -277,9 +280,6 @@ class Namebox
|
|
277
280
|
|
278
281
|
end
|
279
282
|
|
280
|
-
# permits to call the old methods
|
281
|
-
klass.send :include, Namebox::Old
|
282
|
-
|
283
283
|
end
|
284
284
|
end
|
285
285
|
end
|
@@ -455,9 +455,6 @@ class Namebox
|
|
455
455
|
|
456
456
|
end
|
457
457
|
|
458
|
-
# permits to call the old methods
|
459
|
-
new_module.send :include, Namebox::Old
|
460
|
-
|
461
458
|
# include super_tunnel in new_module (must be included after Old)
|
462
459
|
new_module.send :include, super_tunnel
|
463
460
|
|