lib/ruby_indexer/lib/ruby_indexer/entry.rb in ruby-lsp-0.16.5 vs lib/ruby_indexer/lib/ruby_indexer/entry.rb in ruby-lsp-0.16.6
- old
+ new
@@ -59,31 +59,16 @@
extend T::Helpers
abstract!
sig { returns(T::Array[String]) }
- attr_accessor :included_modules
-
- sig { returns(T::Array[String]) }
- attr_accessor :prepended_modules
-
- sig do
- params(
- name: String,
- file_path: String,
- location: T.any(Prism::Location, RubyIndexer::Location),
- comments: T::Array[String],
- ).void
+ def included_modules
+ @included_modules ||= T.let([], T.nilable(T::Array[String]))
end
- def initialize(name, file_path, location, comments)
- super(name, file_path, location, comments)
- @included_modules = T.let([], T::Array[String])
- @prepended_modules = T.let([], T::Array[String])
- end
- sig { returns(String) }
- def short_name
- T.must(@name.split("::").last)
+ sig { returns(T::Array[String]) }
+ def prepended_modules
+ @prepended_modules ||= T.let([], T.nilable(T::Array[String]))
end
end
class Module < Namespace
end