profile_file(filepath, **options) -> nilRuby 3.4 から[permalink][rdoc][edit]-
filepathで指定したファイルを構文解析しますが、結果を Ruby オブジェクトとして構築せずに nil を返します。Prism?.profile のファイル版です。オプションは Prism?.parse と同じです。
- [PARAM]
filepath: - 解析する Ruby プログラムのファイルパスを指定します。
- [PARAM]
options: - Prism?.parse を参照してください。
require "prism" File.write("sample.rb", "1 + 2\n") p Prism.profile_file("sample.rb") # => nil[SEE_ALSO] Prism?.profile
- [PARAM]