Class: Solargraph::Pin::Signature

Inherits:
Base
  • Object
show all
Defined in:
lib/solargraph/pin/signature.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#code_object, #location, #name, #path, #source

Attributes included from Common

#closure, #location

Instance Method Summary collapse

Methods inherited from Base

#==, #comments, #completion_item_kind, #deprecated?, #directives, #docstring, #filename, #infer, #inspect, #macros, #maybe_directives?, #nearly?, #probe, #probed?, #proxied?, #proxy, #realize, #symbol_kind, #to_s, #try_merge!, #typify, #variable?

Methods included from Documenting

#documentation

Methods included from Conversions

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

Methods included from Common

#binder, #comments, #context, #name, #namespace, #path

Constructor Details

#initialize(parameters, return_type, block = nil) ⇒ Signature

Returns a new instance of Signature.

Parameters:



16
17
18
19
20
# File 'lib/solargraph/pin/signature.rb', line 16

def initialize parameters, return_type, block = nil
  @parameters = parameters
  @return_type = return_type
  @block = block
end

Instance Attribute Details

#blockself (readonly)

Returns:

  • (self)


11
12
13
# File 'lib/solargraph/pin/signature.rb', line 11

def block
  @block
end

#parametersArray<Parameter> (readonly)

Returns:



5
6
7
# File 'lib/solargraph/pin/signature.rb', line 5

def parameters
  @parameters
end

#return_typeComplexType (readonly)

Returns:



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

def return_type
  @return_type
end

Instance Method Details

#block?Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/solargraph/pin/signature.rb', line 26

def block?
  !!@block
end

#identityObject



22
23
24
# File 'lib/solargraph/pin/signature.rb', line 22

def identity
  @identity ||= "signature#{object_id}"
end