Sha256: 11e48e0f14024e33ede4e665f1ffba8d15705f5c23df9f444ef7b5f4df77d42a
Contents?: true
Size: 684 Bytes
Versions: 58
Compression:
Stored size: 684 Bytes
Contents
# typed: strict # frozen_string_literal: true module RubyLsp module Requests module Support class SelectionRange < Interface::SelectionRange extend T::Sig sig { params(position: T::Hash[Symbol, T.untyped]).returns(T::Boolean) } 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 end end end end
Version data entries
58 entries across 58 versions & 1 rubygems