Class: Solargraph::Pin::Symbol

Inherits:
Base
  • Object
show all
Defined in:
lib/solargraph/pin/symbol.rb

Direct Known Subclasses

KeywordParam

Instance Attribute Summary

Attributes inherited from Base

#code_object, #location, #name, #source

Attributes included from Common

#closure, #location

Instance Method Summary collapse

Methods inherited from Base

#==, #docstring, #filename, #identity, #infer, #inspect, #macros, #maybe_directives?, #nearly?, #probe, #probed?, #proxied?, #proxy, #realize, #symbol_kind, #to_s, #try_merge!, #typify, #variable?

Methods included from Documenting

#documentation

Methods included from Conversions

#completion_item, #detail, #link_documentation, #reset_conversions, #resolve_completion_item, #signature_help, #text_documentation

Methods included from Common

#binder, #context, #name

Constructor Details

#initialize(location, name) ⇒ Symbol

Returns a new instance of Symbol.

Parameters:



8
9
10
11
12
# File 'lib/solargraph/pin/symbol.rb', line 8

def initialize location, name
  super(location: location, name: name)
  # @name = name
  # @location = location
end

Instance Method Details

#commentsObject



26
27
28
# File 'lib/solargraph/pin/symbol.rb', line 26

def comments
  ''
end

#completion_item_kindObject



22
23
24
# File 'lib/solargraph/pin/symbol.rb', line 22

def completion_item_kind
  Solargraph::LanguageServer::CompletionItemKinds::KEYWORD
end

#deprecated?Boolean

Returns:

  • (Boolean)


42
43
44
# File 'lib/solargraph/pin/symbol.rb', line 42

def deprecated?
  false
end

#directivesObject



34
35
36
# File 'lib/solargraph/pin/symbol.rb', line 34

def directives
  []
end

#namespaceObject



14
15
16
# File 'lib/solargraph/pin/symbol.rb', line 14

def namespace
  ''
end

#pathObject



18
19
20
# File 'lib/solargraph/pin/symbol.rb', line 18

def path
  ''
end

#return_typeObject



30
31
32
# File 'lib/solargraph/pin/symbol.rb', line 30

def return_type
  @return_type ||= Solargraph::ComplexType::SYMBOL
end

#visibilityObject



38
39
40
# File 'lib/solargraph/pin/symbol.rb', line 38

def visibility
  :public
end