lib/steep/project/hover_content.rb in steep-0.28.0 vs lib/steep/project/hover_content.rb in steep-0.29.0

- old
+ new

@@ -19,13 +19,11 @@ def initialize(project:) @project = project end - def method_definition_for(factory, module_name, singleton_method: nil, instance_method: nil) - type_name = factory.type_name_1(module_name) - + def method_definition_for(factory, type_name, singleton_method: nil, instance_method: nil) case when instance_method factory.definition_builder.build_instance(type_name).methods[instance_method] when singleton_method methods = factory.definition_builder.build_singleton(type_name).methods @@ -84,19 +82,19 @@ factory = context.type_env.subtyping.factory method_name, definition = case receiver_type when AST::Types::Name::Instance method_definition = method_definition_for(factory, receiver_type.name, instance_method: method_name) if method_definition&.defined_in - owner_name = factory.type_name(method_definition.defined_in) + owner_name = method_definition.defined_in [ InstanceMethodName.new(owner_name, method_name), method_definition ] end when AST::Types::Name::Singleton method_definition = method_definition_for(factory, receiver_type.name, singleton_method: method_name) if method_definition&.defined_in - owner_name = factory.type_name(method_definition.defined_in) + owner_name = method_definition.defined_in [ SingletonMethodName.new(owner_name, method_name), method_definition ] end