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
48
49
50
|
# File 'lib/solargraph/api_map/index.rb', line 48
def extend_references
@extend_references ||= Hash.new { |h, k| h[k] = [] }
end
|
43
44
45
|
# File 'lib/solargraph/api_map/index.rb', line 43
def include_references
@include_references ||= Hash.new { |h, k| h[k] = [] }
end
|
#namespace_hash ⇒ Hash{String => Array<Pin::Namespace>}
19
20
21
|
# File 'lib/solargraph/api_map/index.rb', line 19
def namespace_hash
@namespace_hash ||= Hash.new { |h, k| h[k] = [] }
end
|
#path_pin_hash ⇒ Hash{String => Array<Pin::Base>}
29
30
31
|
# File 'lib/solargraph/api_map/index.rb', line 29
def path_pin_hash
@path_pin_hash ||= Hash.new { |h, k| h[k] = [] }
end
|
#pin_class_hash ⇒ Hash{String => Array<Pin::Base>}
24
25
26
|
# File 'lib/solargraph/api_map/index.rb', line 24
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
|
53
54
55
|
# File 'lib/solargraph/api_map/index.rb', line 53
def prepend_references
@prepend_references ||= Hash.new { |h, k| h[k] = [] }
end
|
58
59
60
|
# File 'lib/solargraph/api_map/index.rb', line 58
def superclass_references
@superclass_references ||= Hash.new { |h, k| h[k] = [] }
end
|
Instance Method Details
#merge(pins) ⇒ Object
63
64
65
|
# File 'lib/solargraph/api_map/index.rb', line 63
def merge pins
deep_clone.catalog pins
end
|
#pins_by_class(klass) ⇒ Set<generic<T>>
36
37
38
39
40
|
# File 'lib/solargraph/api_map/index.rb', line 36
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
|