instance method run

Ruby on Rails 2.3.18

Since v2.2.3 Last seen in v2.3.18

Available in: v2.2.3 v2.3.18

Signature

run(object, options = {}, &terminator)

No documentation comment.

Parameters

object req
options opt = {}
terminator block
Source
# 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

Defined in activesupport/lib/active_support/callbacks.rb line 86 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveSupport::Callbacks::CallbackChain

Type at least 2 characters to search.

↑↓ navigate · open · esc close