class ActiveSupport::Callbacks::CallTemplate
def expand(target, value, block)
The actual invocation is left up to the caller to minimize
target.send(method, *arguments, &block)
This array can be used as such:
[target, block, method, *arguments]
Returns an array of the form:
input values.
Return the parts needed to make this call, with the given
def expand(target, value, block) result = @arguments.map { |arg| case arg when :value; value when :target; target when :block; block || raise(ArgumentError) end } result.unshift @method_name result.unshift @override_block || block result.unshift @override_target || target # target, block, method, *arguments = result # target.send(method, *arguments, &block) result end