method

run

rails latest stable - Class: ActiveSupport::Callbacks::CallbackChain

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v2.3.8) is shown here.

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