method
respond_to?
respond_to?(method, include_private_methods = false)
public
Hide source
# File activerecord/lib/active_record/attribute_methods.rb, line 348 def respond_to?(method, include_private_methods = false) method_name = method.to_s if super return true elsif !include_private_methods && super(method, true) # If we're here than we haven't found among non-private methods # but found among all methods. Which means that given method is private. return false elsif !self.class.generated_methods? self.class.define_attribute_methods if self.class.generated_methods.include?(method_name) return true end end if @attributes.nil? return super elsif @attributes.include?(method_name) return true elsif md = self.class.match_attribute_method?(method_name) return true if @attributes.include?(md.pre_match) end super end