Class: Solargraph::Pin::Signature
- Defined in:
- lib/solargraph/pin/signature.rb
Instance Attribute Summary collapse
- #block ⇒ self readonly
- #parameters ⇒ Array<Parameter> readonly
- #return_type ⇒ ComplexType readonly
Attributes inherited from Base
#code_object, #location, #name, #path, #source
Attributes included from Common
Instance Method Summary collapse
- #block? ⇒ Boolean
- #identity ⇒ Object
-
#initialize(parameters, return_type, block = nil) ⇒ Signature
constructor
A new instance of Signature.
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
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.
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
#block ⇒ self (readonly)
11 12 13 |
# File 'lib/solargraph/pin/signature.rb', line 11 def block @block end |
#parameters ⇒ Array<Parameter> (readonly)
5 6 7 |
# File 'lib/solargraph/pin/signature.rb', line 5 def parameters @parameters end |
#return_type ⇒ ComplexType (readonly)
8 9 10 |
# File 'lib/solargraph/pin/signature.rb', line 8 def return_type @return_type end |
Instance Method Details
#block? ⇒ Boolean
26 27 28 |
# File 'lib/solargraph/pin/signature.rb', line 26 def block? !!@block end |
#identity ⇒ Object
22 23 24 |
# File 'lib/solargraph/pin/signature.rb', line 22 def identity @identity ||= "signature#{object_id}" end |