method
attribute_method_matchers_matching
v5.2.3 -
Show latest stable
- Class:
ActiveModel::AttributeMethods::ClassMethods
attribute_method_matchers_matching(method_name)private
No documentation available.
# File activemodel/lib/active_model/attribute_methods.rb, line 353
def attribute_method_matchers_matching(method_name)
attribute_method_matchers_cache.compute_if_absent(method_name) do
# Must try to match prefixes/suffixes first, or else the matcher with no prefix/suffix
# will match every time.
matchers = attribute_method_matchers.partition(&:plain?).reverse.flatten(1)
matchers.map { |method| method.match(method_name) }.compact
end
end