Skip to content

Commit

Permalink
Add shim for @index
Browse files Browse the repository at this point in the history
  • Loading branch information
andyw8 committed Oct 31, 2024
1 parent 144a687 commit 6c51b64
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
6 changes: 0 additions & 6 deletions lib/ruby_lsp/ruby_lsp_rails/indexing_enhancement.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@ module Rails
class IndexingEnhancement < RubyIndexer::Enhancement
extend T::Sig

sig { params(index: RubyIndexer::Index).void }
def initialize(index)
super
@index = index
end

sig do
override.params(
owner: T.nilable(RubyIndexer::Entry::Namespace),
Expand Down
10 changes: 10 additions & 0 deletions sorbet/rbi/shims/ruby_lsp.rbi
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# typed: strict
# frozen_string_literal: true

module RubyIndexer
class Enhancement
def initialize(index)
@index = T.let(@index, RubyIndexer::Index)
end
end
end

0 comments on commit 6c51b64

Please sign in to comment.