Method: YARD::Parser::Ruby::AstNode#jump
- Defined in:
- lib/yard/parser/ruby/ast_node.rb
#jump(*node_types) ⇒ AstNode, self
Searches through the node and all descendants and returns the first node with a type matching any of node_types
, otherwise returns the original node (self).
191 192 193 194 |
# File 'lib/yard/parser/ruby/ast_node.rb', line 191 def jump(*node_types) traverse {|child| return(child) if node_types.include?(child.type) } self end |