Class: Solargraph::Pin::LocalVariable
- Inherits:
-
BaseVariable
- Object
- Base
- BaseVariable
- Solargraph::Pin::LocalVariable
- Includes:
- Localized
- Defined in:
- lib/solargraph/pin/local_variable.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes included from Localized
Attributes inherited from BaseVariable
Attributes inherited from Base
#location, #name, #namespace, #path
Instance Method Summary collapse
-
#initialize(location, namespace, name, comments, assignment, literal, context, block, presence) ⇒ LocalVariable
constructor
A new instance of LocalVariable.
- #kind ⇒ Object
- #try_merge!(pin) ⇒ Object
Methods included from Localized
Methods inherited from BaseVariable
#==, #completion_item_kind, #infer, #nil_assignment?, #return_complex_type, #signature, #symbol_kind, #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, #completion_item_kind, #context, #deprecated?, #directives, #docstring, #filename, #infer, #macros, #maybe_directives?, #nearly?, #return_complex_type, #return_type, #symbol_kind, #to_s, #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, block, presence) ⇒ LocalVariable
Returns a new instance of LocalVariable.
6 7 8 9 10 |
# File 'lib/solargraph/pin/local_variable.rb', line 6 def initialize location, namespace, name, comments, assignment, literal, context, block, presence super(location, namespace, name, comments, assignment, literal, context) @block = block @presence = presence end |
Instance Method Details
#kind ⇒ Object
12 13 14 |
# File 'lib/solargraph/pin/local_variable.rb', line 12 def kind Pin::LOCAL_VARIABLE end |
#try_merge!(pin) ⇒ Object
16 17 18 19 20 |
# File 'lib/solargraph/pin/local_variable.rb', line 16 def try_merge! pin return false unless super @presence = pin.presence true end |