def test_defined?(query)
query_path = query[:path]
query_line = query[:line]
query_method_name = query[:method_name]
available_locations = method_locations
if query_path
available_locations = available_locations.find_all do |location|
location[:path].end_with?(query_path)
end
end
if query_line
available_location = available_locations.reverse.find do |location|
query_line >= location[:line]
end
return false if available_location.nil?
available_locations = [available_location]
end
if query_method_name
available_location = available_locations.find do |location|
query_method_name == location[:method_name]
end
return false if available_location.nil?
available_locations = [available_location]
end
not available_locations.empty?
end