33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
# File 'lib/solargraph-arc.rb', line 33
def local source_map
pins = []
ds = source_map.document_symbols.select {|n| n.is_a?(Solargraph::Pin::Namespace) }
ns = ds.first
return EMPTY_ENVIRON unless ns
pins += run_feature { Schema.instance.process(source_map, ns) }
pins += run_feature { Relation.instance.process(source_map, ns) }
pins += run_feature { Storage.instance.process(source_map, ns) }
pins += run_feature { Autoload.instance.process(source_map, ns, ds) }
pins += run_feature { Devise.instance.process(source_map, ns) }
pins += run_feature { Delegate.instance.process(source_map, ns) }
pins += run_feature { RailsApi.instance.local(source_map, ns) }
Solargraph::Environ.new(pins: pins)
end
|