Method deprecated or moved
This method is deprecated or moved on the latest stable version.
The last existing version (v4.0.2) is shown here.
__define_callbacks(kind, object)
public
This method defines callback chain method for the given kind if it was not
yet defined. This generated method plays caching role.
# File activesupport/lib/active_support/callbacks.rb, line 366
def __define_callbacks(kind, object) #:nodoc:
name = __callback_runner_name(kind)
unless object.respond_to?(name, true)
str = object.send("_#{kind}_callbacks").compile
class_eval def #{name}() #{str} end protected :#{name}, __FILE__, __LINE__ + 1
end
name
end