module Prism::NodeFind
Finds the Prism AST node corresponding to a given Method, UnboundMethod, Proc, or Thread::Backtrace::Location. On CRuby, uses node_id from the instruction sequence for an exact match. On other implementations, falls back to best-effort matching by source location line number.
This module is autoloaded so that programs that donโt use Prism.find donโt pay for its definition.
Public Class Methods
(Method | UnboundMethod | Proc | Thread::Backtrace::Location callable) → Node?
Source
# File vendor/bundle/ruby/4.0.0/gems/prism-2.1.0-x86_64-linux-gnu/sig/generated/prism/node_find.rbs, line 15
def self.find: (Method | UnboundMethod | Proc | Thread::Backtrace::Location callable) -> Node?
Find the node for the given callable or backtrace location.
: (Method | UnboundMethod | Proc | Thread::Backtrace::Location callable) -> Node?