This method is deprecated or moved on the latest stable version.
The last existing version (v3.2.13) is shown here.
respond_to?(method, include_priv = false)
public
A method to determine if an object responds to a message (e.g., a method
call). In Active Resource, a Person object with
a name attribute can answer true to my_person.respond_to?(:name),
my_person.respond_to?(:name=),
and my_person.respond_to?(:name?).
# File activeresource/lib/active_resource/base.rb, line 1323
def respond_to?(method, include_priv = false)
method_name = method.to_s
if attributes.nil?
super
elsif known_attributes.include?(method_name)
true
elsif method_name =~ /(?:=|\?)$/ && attributes.include?($`)
true
else
# super must be called at the end of the method, because the inherited respond_to?
# would return true for generated readers, even if the attribute wasn't present
super
end
end