method

respond_to?

respond_to?(method, include_priv = false)
public

A Person object with a name attribute can ask person.respond_to?("name"), person.respond_to?("name="), and person.respond_to?("name?") which will all return true.