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, #docstring, #location, #name, #source, #type_location

Attributes included from Common

#closure, #context, #location

Instance Method Summary collapse

Methods inherited from Base

#==, #all_location_text, #all_rooted?, #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, #combine_directives, #combine_name, #combine_return_type, #combine_with, #desc, #dodgy_return_type_source?, #erase_generics, #filename, #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

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, #name

Constructor Details

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

Returns a new instance of Symbol.

Parameters:



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

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

#commentsObject



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

def comments
  ''
end

#completion_item_kindObject



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

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

#deprecated?Boolean

Returns:

  • (Boolean)


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

def deprecated?
  false
end

#directivesObject



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

def directives
  []
end

#namespaceObject



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

def namespace
  ''
end

#pathObject



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

def path
  ''
end

#return_typeObject



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

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

#visibilityObject



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

def visibility
  :public
end