Method: Prism::LocalVariableWriteNode#depth
- Defined in:
- lib/prism/node.rb
#depth ⇒ Object (readonly)
The number of semantic scopes we have to traverse to find the declaration of this variable.
foo = 1 # depth 0
tap { foo = 1 } # depth 1
The specific rules for calculating the depth may differ from individual Ruby implementations, as they are not specified by the language. For more information, see [the Prism documentation](github.com/ruby/prism/blob/main/docs/local_variable_depth.md).
11013 11014 11015 |
# File 'lib/prism/node.rb', line 11013 def depth @depth end |