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 |
# File 'lib/ruby_lsp/requests/support/selection_range.rb', line 11 def cover?(position) line_range = (range.start.line..range.end.line) character_range = (range.start.character..range.end.character) line_range.cover?(position[:line]) && character_range.cover?(position[:character]) end |