instance method
matched_attribute_method
Ruby on Rails 7.2.3
Since v5.2.8.1 PrivateSignature
matched_attribute_method(method_name)
Returns a struct representing the matching attribute method. The struct’s attributes are prefix, base and suffix.
Parameters
-
method_namereq
Source
# File activemodel/lib/active_model/attribute_methods.rb, line 547
def matched_attribute_method(method_name)
matches = self.class.send(:attribute_method_patterns_matching, method_name)
matches.detect { |match| attribute_method?(match.attr_name) }
end
Defined in activemodel/lib/active_model/attribute_methods.rb line 547
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveModel::AttributeMethods