Class: RubyLsp::Requests::Support::SelectionRange
- Inherits:
-
SelectionRange
- Object
- SelectionRange
- RubyLsp::Requests::Support::SelectionRange
- Extended by:
- T::Sig
- Defined in:
- lib/ruby_lsp/requests/support/selection_range.rb
Instance Method Summary collapse
Instance Method Details
#cover?(position) ⇒ Boolean
11 12 13 14 15 16 17 |
# File 'lib/ruby_lsp/requests/support/selection_range.rb', line 11 def cover?(position) start_covered = range.start.line < position[:line] || (range.start.line == position[:line] && range.start.character <= position[:character]) end_covered = range.end.line > position[:line] || (range.end.line == position[:line] && range.end.character >= position[:character]) start_covered && end_covered end |