def find_method method_name, klass
return nil if sexp? method_name
method_name = method_name.to_sym
if method = @method_cache[method_name]
return method
end
controller = @tracker.controllers[klass]
controller ||= @tracker.libs[klass]
if klass and controller
method = controller.get_method method_name
if method.nil?
controller.includes.each do |included|
method = find_method method_name, included
if method
@method_cache[method_name] = method
return method
end
end
@method_cache[method_name] = find_method method_name, controller.parent
else
@method_cache[method_name] = { :controller => controller.name, :method => method[:src] }
end
else
nil
end
end