Class: Evilution::AST::SorbetSigDetector Private
- Inherits:
-
Object
- Object
- Evilution::AST::SorbetSigDetector
- Defined in:
- lib/evilution/ast/sorbet_sig_detector.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
- #call(source) ⇒ Object private
- #line_ranges(source) ⇒ Object private
Instance Method Details
#call(source) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/evilution/ast/sorbet_sig_detector.rb', line 6 def call(source) return [] if source.empty? result = Prism.parse(source) return [] if result.failure? ranges = [] collect_sig_ranges(result.value, ranges, :byte) ranges end |
#line_ranges(source) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/evilution/ast/sorbet_sig_detector.rb', line 17 def line_ranges(source) return [] if source.empty? result = Prism.parse(source) return [] if result.failure? ranges = [] collect_sig_ranges(result.value, ranges, :line) ranges end |