Flowdock
method

respond_to?

Importance_1
Ruby on Rails latest stable (v4.0.2) - 0 notes - Class: ActiveRecord::Base
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.

Show source
Register or log in to add new notes.