13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
# File 'lib/codercompanion/ruby/ruby_tree_walker.rb', line 13
def build(results)
obj = {}
results.each do |source|
cache_handler = CoderCompanion.cache_handler
modified = cache_handler.is_file_modified?(source[:file_path])
cache_handler.update_cache_path(source[:file_path])
if source[:body][0].root?
source[:body][0].children.each do |child|
if (child.type == :class || child.type == :module)
child_name = child.path
obj[child_name] = build_class_or_module(child, modified, obj)
end
end
end
end
post_process_object(obj)
return obj
end
|