class RubyLsp::NodeContext
def handle_nesting_nodes(nodes)
def handle_nesting_nodes(nodes) nesting = [] surrounding_method = nil #: String? @nesting_nodes.each do |node| case node when Prism::ClassNode, Prism::ModuleNode nesting << node.constant_path.slice when Prism::SingletonClassNode nesting << "<Class:#{nesting.flat_map { |n| n.split("::") }.last}>" when Prism::DefNode surrounding_method = node.name.to_s next unless node.receiver.is_a?(Prism::SelfNode) nesting << "<Class:#{nesting.flat_map { |n| n.split("::") }.last}>" end end [nesting, surrounding_method] end