Class: Solargraph::ApiMap::Index
- Inherits:
-
Object
- Object
- Solargraph::ApiMap::Index
show all
- Includes:
- Logging
- Defined in:
- lib/solargraph/api_map/index.rb
Constant Summary
Constants included
from Logging
Logging::DEFAULT_LOG_LEVEL, Logging::LOG_LEVELS
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods included from Logging
logger
Constructor Details
#initialize(pins = []) ⇒ Index
Returns a new instance of Index.
9
10
11
|
# File 'lib/solargraph/api_map/index.rb', line 9
def initialize pins = []
catalog pins
end
|
Instance Attribute Details
#extend_references ⇒ Hash{String => Array<String>}
57
58
59
|
# File 'lib/solargraph/api_map/index.rb', line 57
def extend_references
@extend_references ||= Hash.new { |h, k| h[k] = [] }
end
|
#include_references ⇒ Hash{String => Array<String>}
47
48
49
|
# File 'lib/solargraph/api_map/index.rb', line 47
def include_references
@include_references ||= Hash.new { |h, k| h[k] = [] }
end
|
#namespace_hash ⇒ Hash{String => Array<Pin::Namespace>}
22
23
24
|
# File 'lib/solargraph/api_map/index.rb', line 22
def namespace_hash
@namespace_hash ||= Hash.new { |h, k| h[k] = [] }
end
|
#namespaces ⇒ Set<String>
19
20
21
|
# File 'lib/solargraph/api_map/index.rb', line 19
def namespaces
@namespaces
end
|
#path_pin_hash ⇒ Hash{String => Array<Pin::Base>}
32
33
34
|
# File 'lib/solargraph/api_map/index.rb', line 32
def path_pin_hash
@path_pin_hash ||= Hash.new { |h, k| h[k] = [] }
end
|
#pin_class_hash ⇒ Hash{String => Array<Pin::Base>}
27
28
29
|
# File 'lib/solargraph/api_map/index.rb', line 27
def pin_class_hash
@pin_class_hash ||= Hash.new { |h, k| h[k] = [] }
end
|
14
15
16
|
# File 'lib/solargraph/api_map/index.rb', line 14
def pins
@pins ||= []
end
|
#prepend_references ⇒ Hash{String => Array<String>}
62
63
64
|
# File 'lib/solargraph/api_map/index.rb', line 62
def prepend_references
@prepend_references ||= Hash.new { |h, k| h[k] = [] }
end
|
#superclass_references ⇒ Hash{String => Array<String>}
67
68
69
|
# File 'lib/solargraph/api_map/index.rb', line 67
def superclass_references
@superclass_references ||= Hash.new { |h, k| h[k] = [] }
end
|
Instance Method Details
#include_reference_pins ⇒ Hash{String => Array<Pin::Reference::Include>}
52
53
54
|
# File 'lib/solargraph/api_map/index.rb', line 52
def include_reference_pins
@include_reference_pins ||= Hash.new { |h, k| h[k] = [] }
end
|
#merge(pins) ⇒ self
73
74
75
|
# File 'lib/solargraph/api_map/index.rb', line 73
def merge pins
deep_clone.catalog pins
end
|
#pins_by_class(klass) ⇒ Set<generic<T>>
39
40
41
42
43
44
|
# File 'lib/solargraph/api_map/index.rb', line 39
def pins_by_class klass
s = Set.new
@pin_select_cache[klass] ||= pin_class_hash.each_with_object(s) { |(key, o), n| n.merge(o) if key <= klass }
end
|