5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
# File 'lib/steep/services/hover_provider/singleton_methods.rb', line 5
def content_for(service:, path:, line:, column:)
project = service.project
case
when target = project.target_for_inline_source_path(path)
service = Ruby.new(service: service)
service.content_for_inline(target: target, path: path, line: line, column: column) ||
service.content_for(target: target, path: path, line: line, column: column)
when target = project.target_for_source_path(path)
Ruby.new(service: service).content_for(target: target, path: path, line: line, column: column)
when target = project.target_for_signature_path(path)
RBS.new(service: service).content_for(target: target, path: path, line: line, column: column)
end
end
|