lib/flexirest/callbacks.rb in flexirest-1.5.7 vs lib/flexirest/callbacks.rb in flexirest-1.5.8
- old
+ new
@@ -25,16 +25,19 @@
@after_callbacks ||= []
callbacks = (type == :before ? @before_callbacks : @after_callbacks)
callbacks.each do |callback|
if callback.is_a? Symbol
if self.respond_to?(callback)
- self.send(callback, name, param)
+ result = self.send(callback, name, param)
else
instance = self.new
- instance.send(callback, name, param)
+ result = instance.send(callback, name, param)
end
else
- callback.call(name, param)
+ result = callback.call(name, param)
+ end
+ if result == :retry
+ return :retry
end
end
end
def _handle_super_class_callbacks(type, name, request)