Class: Solargraph::Pin::Attribute
- Inherits:
-
Base
- Object
- Base
- Solargraph::Pin::Attribute
show all
- Defined in:
- lib/solargraph/pin/attribute.rb
Instance Attribute Summary collapse
Attributes inherited from Base
#location, #name, #namespace
Instance Method Summary
collapse
Methods inherited from Base
#==, #comments, #context, #deprecated?, #directives, #docstring, #filename, #infer, #macros, #maybe_directives?, #nearly?, #return_type, #to_s, #try_merge!, #variable?
#documentation, #helper
#completion_item, #detail, #link_documentation, #reset_conversions, #resolve_completion_item, #signature_help
Constructor Details
#initialize(location, namespace, name, comments, access, scope, visibility) ⇒ Attribute
Returns a new instance of Attribute.
13
14
15
16
17
18
|
# File 'lib/solargraph/pin/attribute.rb', line 13
def initialize location, namespace, name, , access, scope, visibility
super(location, namespace, name, )
@access = access
@scope = scope
@visibility = visibility
end
|
Instance Attribute Details
Returns :reader or :writer.
5
6
7
|
# File 'lib/solargraph/pin/attribute.rb', line 5
def access
@access
end
|
Returns :class or :instance.
8
9
10
|
# File 'lib/solargraph/pin/attribute.rb', line 8
def scope
@scope
end
|
#visibility ⇒ Symbol
Returns :public, :protected, or :private.
11
12
13
|
# File 'lib/solargraph/pin/attribute.rb', line 11
def visibility
@visibility
end
|
Instance Method Details
#completion_item_kind ⇒ Object
#parameter_names ⇒ Object
46
47
48
|
# File 'lib/solargraph/pin/attribute.rb', line 46
def parameter_names
[]
end
|
#parameters ⇒ Object
40
41
42
43
44
|
# File 'lib/solargraph/pin/attribute.rb', line 40
def parameters
[]
end
|
#path ⇒ Object
32
33
34
|
# File 'lib/solargraph/pin/attribute.rb', line 32
def path
@path ||= namespace + (scope == :instance ? '#' : '.') + name
end
|
#return_complex_type ⇒ Object
36
37
38
|
# File 'lib/solargraph/pin/attribute.rb', line 36
def return_complex_type
@return_complex_type ||= generate_complex_type
end
|