Class: Solargraph::Pin::DuckMethod

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

Overview

DuckMethod pins are used to add completion items for type tags that use duck typing, e.g., ‘@param file [#read]`.

Instance Attribute Summary

Attributes inherited from Method

#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, #kind, #nearly?, #parameter_names, #path, #return_complex_type, #symbol_kind

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, name) ⇒ DuckMethod

Returns a new instance of DuckMethod.

Parameters:



9
10
11
# File 'lib/solargraph/pin/duck_method.rb', line 9

def initialize location, name
  super(location, '', name, nil, :instance, :public, [])
end