7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# File 'lib/holistic/ruby/reference/store.rb', line 7
def call(database:, processing_queue:, scope:, clues:, location:)
record = Record.new(location.identifier, { identifier: location.identifier, clues:, location: })
reference = database.store(location.identifier, record)
reference.relation(:located_in_scope).add!(scope)
reference.relation(:reference_defined_in_file).add!(location.file)
should_resolve_type_inference_with_high_priority =
reference.find_clue(::Holistic::Ruby::TypeInference::Clue::ReferenceToSuperclass).present?
if should_resolve_type_inference_with_high_priority
processing_queue.push_with_high_priority(reference)
else
processing_queue.push(reference)
end
end
|