Class: Solargraph::Pin::Symbol

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

Direct Known Subclasses

KeywordParam

Constant Summary

Constants included from Logging

Logging::DEFAULT_LOG_LEVEL, Logging::LOG_LEVELS

Instance Attribute Summary

Attributes inherited from Base

#code_object, #combine_priority, #docstring, #location, #name, #source, #type_location

Attributes included from Common

#context, #location

Instance Method Summary collapse

Methods inherited from Base

#==, #all_location_text, #all_rooted?, #assert_location_provided, #assert_same, #assert_same_array_content, #assert_same_count, #assert_same_macros, #assert_source_provided, #best_location, #choose, #choose_longer, #choose_node, #choose_pin_attr, #choose_pin_attr_with_same_name, #choose_priority, #combine_closure, #combine_directives, #combine_name, #combine_return_type, #combine_with, #desc, #dodgy_return_type_source?, #erase_generics, #filename, #gates, #identity, #infer, #inner_desc, #inspect, #macros, #maybe_directives?, #nearly?, #needs_consistent_name?, #prefer_rbs_location, #presence_certain?, #probe, #probed?, #proxied?, #proxy, #rbs_location?, #realize, #reset_generated!, #resolve_generics, #resolve_generics_from_context, #symbol_kind, #to_rbs, #to_s, #transform_types, #type_desc, #typify, #variable?

Methods included from Logging

log_level, logger

Methods included from Documenting

#documentation, normalize_indentation, strip_html_comments

Methods included from Conversions

#completion_item, #detail, #link_documentation, #probed?, #proxied?, #reset_conversions, #resolve_completion_item, #signature_help, #text_documentation

Methods included from Common

#binder, #closure=, #name, #reset_generated!, #source

Constructor Details

#initialize(location, name, **kwargs) ⇒ Symbol

Returns a new instance of Symbol.

Parameters:



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

def initialize(location, name, **kwargs)
  # @sg-ignore "Unrecognized keyword argument kwargs to Solargraph::Pin::Base#initialize"
  super(location: location, name: name, **kwargs)
  # @name = name
  # @location = location
end

Instance Method Details

#closureObject



24
25
26
# File 'lib/solargraph/pin/symbol.rb', line 24

def closure
  @closure ||= Pin::ROOT_PIN
end

#commentsObject



32
33
34
# File 'lib/solargraph/pin/symbol.rb', line 32

def comments
  ''
end

#completion_item_kindObject



28
29
30
# File 'lib/solargraph/pin/symbol.rb', line 28

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

#deprecated?Boolean

Returns:

  • (Boolean)


49
50
51
# File 'lib/solargraph/pin/symbol.rb', line 49

def deprecated?
  false
end

#directivesObject



40
41
42
# File 'lib/solargraph/pin/symbol.rb', line 40

def directives
  []
end

#namespaceObject



16
17
18
# File 'lib/solargraph/pin/symbol.rb', line 16

def namespace
  ''
end

#pathObject



20
21
22
# File 'lib/solargraph/pin/symbol.rb', line 20

def path
  ''
end

#return_typeObject



36
37
38
# File 'lib/solargraph/pin/symbol.rb', line 36

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

#visibility::Symbol

Returns:

  • (::Symbol)


45
46
47
# File 'lib/solargraph/pin/symbol.rb', line 45

def visibility
  :public
end