lib/interloper.rb in interloper-0.1.5 vs lib/interloper.rb in interloper-0.1.6
- old
+ new
@@ -90,11 +90,12 @@
unless instance_methods.include? method_name
module_eval do
eval <<-CODE
def #{method_name}(*args, &block)
self.class.const_get(:#{interloper_module_name}).run_callbacks(:before, :#{method_name}, self, *args, &block)
- super(*args, &block)
+ return_val = super(*args, &block)
self.class.const_get(:#{interloper_module_name}).run_callbacks(:after, :#{method_name}, self, *args, &block)
+ return_val
end
CODE
end
end
end