Sha256: 58762c851a5231302070dbb44b08e1238088a10808414796890ec4554320642d

Contents?: true

Size: 575 Bytes

Versions: 18

Compression:

Stored size: 575 Bytes

Contents

# typed: strict
# frozen_string_literal: true

module RubyLsp
  module Requests
    module Support
      class SelectionRange < LanguageServer::Protocol::Interface::SelectionRange
        extend T::Sig

        sig { params(position: Document::PositionShape).returns(T::Boolean) }
        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
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
ruby-lsp-0.4.2 lib/ruby_lsp/requests/support/selection_range.rb
ruby-lsp-0.4.1 lib/ruby_lsp/requests/support/selection_range.rb
ruby-lsp-0.4.0 lib/ruby_lsp/requests/support/selection_range.rb
ruby-lsp-0.3.8 lib/ruby_lsp/requests/support/selection_range.rb
ruby-lsp-0.3.7 lib/ruby_lsp/requests/support/selection_range.rb
ruby-lsp-0.3.6 lib/ruby_lsp/requests/support/selection_range.rb
ruby-lsp-0.3.5 lib/ruby_lsp/requests/support/selection_range.rb
ruby-lsp-0.3.4 lib/ruby_lsp/requests/support/selection_range.rb
ruby-lsp-0.3.3 lib/ruby_lsp/requests/support/selection_range.rb
ruby-lsp-0.3.2 lib/ruby_lsp/requests/support/selection_range.rb
ruby-lsp-0.3.1 lib/ruby_lsp/requests/support/selection_range.rb
ruby-lsp-0.3.0 lib/ruby_lsp/requests/support/selection_range.rb
ruby-lsp-0.2.4 lib/ruby_lsp/requests/support/selection_range.rb
ruby-lsp-0.2.3 lib/ruby_lsp/requests/support/selection_range.rb
ruby-lsp-0.2.2 lib/ruby_lsp/requests/support/selection_range.rb
ruby-lsp-0.2.1 lib/ruby_lsp/requests/support/selection_range.rb
ruby-lsp-0.2.0 lib/ruby_lsp/requests/support/selection_range.rb
ruby-lsp-0.1.0 lib/ruby_lsp/requests/support/selection_range.rb