instance method guard_private_attribute_method!

Ruby on Rails 3.0.20

Since v3.0.20 Last seen in v3.1.12 Private

Available in: v3.0.20 v3.1.12

Signature

guard_private_attribute_method!(method_name, args)

prevent method_missing from calling private methods with #send

Parameters

method_name req
args req
Source
# File activemodel/lib/active_model/attribute_methods.rb, line 430
      def guard_private_attribute_method!(method_name, args)
        if self.class.private_method_defined?(method_name)
          raise NoMethodError.new("Attempt to call private method", method_name, args)
        end
      end

Defined in activemodel/lib/active_model/attribute_methods.rb line 430 · 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