instance method
respond_to?
Ruby on Rails 3.1.12
Since v3.0.20Signature
respond_to?(method, include_private_methods = false)
No documentation comment.
Parameters
-
methodreq -
include_private_methodsopt = false
Source
# File activemodel/lib/active_model/attribute_methods.rb, line 392
def respond_to?(method, include_private_methods = false)
if super
return true
elsif !include_private_methods && super(method, true)
# If we're here then we haven't found among non-private methods
# but found among all methods. Which means that the given method is private.
return false
elsif match_attribute_method?(method.to_s)
return true
end
super
end
Defined in activemodel/lib/active_model/attribute_methods.rb line 392
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveModel::AttributeMethods