instance method method_defined_within?

Ruby on Rails 3.2.22.5

Since v3.2.22.5 Last seen in v3.2.22.5

Signature

method_defined_within?(name, klass, sup = klass.superclass)

No documentation comment.

Parameters

name req
klass req
sup opt = klass.superclass
Source
# File activerecord/lib/active_record/attribute_methods.rb, line 109
      def method_defined_within?(name, klass, sup = klass.superclass)
        if klass.method_defined?(name) || klass.private_method_defined?(name)
          if sup.method_defined?(name) || sup.private_method_defined?(name)
            klass.instance_method(name).owner != sup.instance_method(name).owner
          else
            true
          end
        else
          false
        end
      end

Defined in activerecord/lib/active_record/attribute_methods.rb line 109 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveRecord::AttributeMethods::ClassMethods

Type at least 2 characters to search.

↑↓ navigate · open · esc close