# Ruby respond_to? function

respond_to? takes a second pramater. If the second parameter is true then public and private methods are also searched. Otherwise only the public methods are searched.

Discovered this while reading the Dev.to's codebase (opens new window).

Documentation (opens new window)

Last Modified: 9/21/2020, 12:46:10 PM