Class: Solargraph::Pin::Constant
- Inherits:
-
BaseVariable
- Object
- Base
- BaseVariable
- Solargraph::Pin::Constant
- Defined in:
- lib/solargraph/pin/constant.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#visibility ⇒ Object
readonly
Returns the value of attribute visibility.
Attributes inherited from BaseVariable
Attributes inherited from Base
Instance Method Summary collapse
- #completion_item_kind ⇒ Object
-
#initialize(location, namespace, name, comments, assignment, literal, context, visibility) ⇒ Constant
constructor
A new instance of Constant.
- #kind ⇒ Object
- #path ⇒ Object
- #symbol_kind ⇒ Integer
Methods inherited from BaseVariable
#==, #infer, #nil_assignment?, #return_complex_type, #signature, #try_merge!, #variable?
Methods included from Source::NodeMethods
const_from, drill_signature, get_node_end_position, get_node_start_position, infer_literal_node_type, pack_name, resolve_node_signature, returns_from, unpack_name
Methods inherited from Base
#==, #comments, #context, #deprecated?, #directives, #docstring, #filename, #infer, #macros, #maybe_directives?, #nearly?, #return_complex_type, #return_type, #to_s, #try_merge!, #variable?
Methods included from Documenting
Methods included from Conversions
#completion_item, #detail, #link_documentation, #reset_conversions, #resolve_completion_item, #signature_help
Constructor Details
#initialize(location, namespace, name, comments, assignment, literal, context, visibility) ⇒ Constant
Returns a new instance of Constant.
6 7 8 9 |
# File 'lib/solargraph/pin/constant.rb', line 6 def initialize location, namespace, name, comments, assignment, literal, context, visibility super(location, namespace, name, comments, assignment, literal, context) @visibility = visibility end |
Instance Attribute Details
#visibility ⇒ Object (readonly)
Returns the value of attribute visibility.
4 5 6 |
# File 'lib/solargraph/pin/constant.rb', line 4 def visibility @visibility end |
Instance Method Details
#completion_item_kind ⇒ Object
15 16 17 |
# File 'lib/solargraph/pin/constant.rb', line 15 def completion_item_kind Solargraph::LanguageServer::CompletionItemKinds::CONSTANT end |
#path ⇒ Object
24 25 26 27 |
# File 'lib/solargraph/pin/constant.rb', line 24 def path return name if namespace.empty? "#{namespace}::#{name}" end |
#symbol_kind ⇒ Integer
20 21 22 |
# File 'lib/solargraph/pin/constant.rb', line 20 def symbol_kind LanguageServer::SymbolKinds::CONSTANT end |