Class: Solargraph::Pin::Signature

Inherits:
Callable show all
Defined in:
lib/solargraph/pin/signature.rb

Instance Attribute Summary collapse

Attributes inherited from Callable

#block, #parameters, #return_type

Attributes inherited from Closure

#scope

Attributes inherited from Base

#code_object, #location, #name, #path, #return_type, #source, #type_location

Attributes included from Common

#closure, #context, #location

Instance Method Summary collapse

Methods inherited from Callable

#arity_matches?, #block?, #mandatory_positional_param_count, #method_namespace, #parameter_names, #resolve_generics_from_context, #resolve_generics_from_context_until_complete, #to_rbs, #transform_types

Methods inherited from Closure

#binder, #context, #gates, #generic_defaults, #rbs_generics, #to_rbs

Methods inherited from Base

#==, #all_location_text, #all_rooted?, #assert_source_provided, #best_location, #comments, #completion_item_kind, #deprecated?, #desc, #directives, #docstring, #erase_generics, #filename, #infer, #inner_desc, #inspect, #macros, #maybe_directives?, #nearly?, #presence_certain?, #probe, #probed?, #proxied?, #proxy, #realize, #reset_generated!, #resolve_generics, #resolve_generics_from_context, #symbol_kind, #to_rbs, #to_s, #transform_types, #try_merge!, #type_desc, #typify, #variable?

Methods included from Documenting

#documentation, normalize_indentation, strip_html_comments

Methods included from Conversions

#completion_item, #completion_item_kind, #deprecated?, #detail, #link_documentation, #probed?, #proxied?, #reset_conversions, #resolve_completion_item, #signature_help, #text_documentation

Methods included from Common

#binder, #comments, #name, #namespace, #path, #return_type

Constructor Details

#initialize(**splat) ⇒ Signature

Returns a new instance of Signature.



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

def initialize **splat
  super(**splat)
end

Instance Attribute Details

#closure=(value) ⇒ Object (writeonly)

allow signature to be created before method pin, then set this to the method pin



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

def closure=(value)
  @closure = value
end

Instance Method Details

#genericsObject



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

def generics
  @generics ||= [].freeze
end

#identityObject



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

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