class RuboCop::AST::Node
def each_descendant(*types, &block)
-
(Enumerator)- if no block is given -
(self)- if a block is given
Other tags:
- Yieldparam: node - each descendant node
Parameters:
-
type_b(Symbol) -- a node type -
type_a(Symbol) -- a node type -
type(Symbol) -- a node type
Overloads:
-
each_descendant(type_a, type_b, ...) -
each_descendant(type) -
each_descendant
def each_descendant(*types, &block) return to_enum(__method__, *types) unless block_given? visit_descendants(types, &block) self end