Class: Parser::AST::Node

Inherits:
Object
  • Object
show all
Defined in:
lib/extends/parser.rb

Instance Method Summary collapse

Instance Method Details

#to_treeObject



2
3
4
5
6
7
8
9
10
# File 'lib/extends/parser.rb', line 2

def to_tree
  self.to_a.map { |n|
    if n.is_a? Parser::AST::Node
      n.to_tree
    else
      n
    end
  }
end