class RubyIndexer::Collector

def handle_def_node(node)

def handle_def_node(node)
  method_name = node.name.to_s
  comments = collect_comments(node)
  case node.receiver
  when nil
    @index << Entry::InstanceMethod.new(
      method_name,
      @file_path,
      node.location,
      comments,
      node.parameters,
      @current_owner,
    )
  when Prism::SelfNode
    @index << Entry::SingletonMethod.new(
      method_name,
      @file_path,
      node.location,
      comments,
      node.parameters,
      @current_owner,
    )
  end
end