instance method evaluate_method

Ruby on Rails 2.3.18

Since v2.2.3 Last seen in v2.3.18 Private

Available in: v2.2.3 v2.3.18

Signature

evaluate_method(method, *args, &block)

No documentation comment.

Parameters

method req
args rest
block block
Source
# File activesupport/lib/active_support/callbacks.rb, line 174
        def evaluate_method(method, *args, &block)
          case method
            when Symbol
              object = args.shift
              object.send(method, *args, &block)
            when String
              eval(method, args.first.instance_eval { binding })
            when Proc, Method
              method.call(*args, &block)
            else
              if method.respond_to?(kind)
                method.send(kind, *args, &block)
              else
                raise ArgumentError,
                  "Callbacks must be a symbol denoting the method to call, a string to be evaluated, " +
                  "a block to be invoked, or an object responding to the callback method."
              end
          end
        end

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

Defined in ActiveSupport::Callbacks::Callback

Type at least 2 characters to search.

↑↓ navigate · open · esc close