instance method match_attribute_method?

Ruby on Rails 3.0.20

Since v3.0.20 Last seen in v4.2.9 Private

Available in: v3.0.20 v3.1.12 v3.2.22.5 v4.0.13 v4.1.16 v4.2.9

Signature

match_attribute_method?(method_name)

Returns a struct representing the matching attribute method. The struct’s attributes are prefix, base and suffix.

Parameters

method_name req
Source
# File activemodel/lib/active_model/attribute_methods.rb, line 420
      def match_attribute_method?(method_name)
        self.class.send(:attribute_method_matchers).each do |method|
          if (match = method.match(method_name)) && attribute_method?(match.attr_name)
            return match
          end
        end
        nil
      end

Defined in activemodel/lib/active_model/attribute_methods.rb line 420 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveModel::AttributeMethods

Type at least 2 characters to search.

↑↓ navigate · open · esc close