Skip to content

Add support for private_class_method in the indexer #2781

@vinistock

Description

@vinistock

Very similar to #2653 and how we handle private constants. We need to start taking private_class_method into consideration in the indexer.

When not using the class << self syntax, the private method has no impact whatsoever on the visibility of methods and the only way to mark them as private is by invoking private_class_method.

class Foo
  private

  # this method is public
  def self.bar
  end

  # this makes it private
  private_class_method(:bar)
end

Essentially, we need to:

  • Add a new branch here to handle the private_class_method
  • Grab the entry that was already inserted in the index for that method and owner combination
  • Mark the method as private

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestgood-first-issueGood for newcomersserverThis pull request should be included in the server gem's release notes

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions