Skip to content

Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →

instance method

Prism::Source#lines

lines

Returns the lines of the source code as an array of strings.

See also #line_end #line_start #line #slice also in 4.0