method
run
v2.3.8 -
Show latest stable
- Class:
ActiveSupport::Callbacks::CallbackChain
run(object, options = {}, &terminator)public
No documentation available.
# File activesupport/lib/active_support/callbacks.rb, line 86
def run(object, options = {}, &terminator)
enumerator = options[:enumerator] || :each
unless block_given?
send(enumerator) { |callback| callback.call(object) }
else
send(enumerator) do |callback|
result = callback.call(object)
break result if terminator.call(result, object)
end
end
end