Module: Prism::Translation::Parser::ProcessedSource
- Defined in:
- lib/prism/translation/parser/rubocop.rb
Overview
This module gets prepended into RuboCop::AST::ProcessedSource.
Instance Method Summary collapse
-
#parser_class(ruby_version) ⇒ Object
Redefine parser_class so that we can inject the prism parser into the list of known parsers.
Instance Method Details
#parser_class(ruby_version) ⇒ Object
Redefine parser_class so that we can inject the prism parser into the list of known parsers.
20 21 22 23 24 25 26 27 |
# File 'lib/prism/translation/parser/rubocop.rb', line 20 def parser_class(ruby_version) if ruby_version == Prism::Translation::Parser::VERSION_3_3 require "prism/translation/parser" Prism::Translation::Parser else super end end |