method

parse_file

ruby latest stable - Class: RubyVM::AbstractSyntaxTree

Method not available on this version

This method is only available on newer versions. The first available version (v2_6_3) is shown here.

parse_file(p1)
public

Reads the file from pathname, then parses it like ::parse, returning the root node of the abstract syntax tree.

SyntaxError is raised if pathname’s contents are not valid Ruby syntax.

RubyVM::AbstractSyntaxTree.parse_file("my-app/app.rb")
# => #<RubyVM::AbstractSyntaxTree::Node(NODE_SCOPE(0) 1:0, 31:3): >