Class: Solargraph::Pin::MethodAlias

Inherits:
Method show all
Defined in:
lib/solargraph/pin/method_alias.rb

Overview

Use this class to track method aliases for later remapping. Common examples are aliases for superclass methods or methods from included modules.

Instance Attribute Summary collapse

Attributes inherited from Method

#node, #parameters, #scope, #visibility

Attributes inherited from Base

#kind, #location, #name, #namespace, #path

Instance Method Summary collapse

Methods inherited from Method

#completion_item_kind, #context, #documentation, #infer, #kind, #nearly?, #parameter_names, #path, #return_complex_type, #symbol_kind, #try_merge!

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, #try_merge!, #variable?

Methods included from Documenting

#documentation

Methods included from Conversions

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

Constructor Details

#initialize(location, namespace, name, scope, original) ⇒ MethodAlias

Returns a new instance of MethodAlias.



10
11
12
13
14
15
16
# File 'lib/solargraph/pin/method_alias.rb', line 10

def initialize location, namespace, name, scope, original
  # @todo Determine how to handle these parameters. Among other things,
  #   determine if the visibility is defined by the location of the
  #   alias call or the original method.
  super(location, namespace, name, '', scope, :public, [])
  @original = original
end

Instance Attribute Details

#originalObject (readonly)

Returns the value of attribute original.



8
9
10
# File 'lib/solargraph/pin/method_alias.rb', line 8

def original
  @original
end