Class: Solargraph::Pin::Signature

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of Signature.



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

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

Instance Attribute Details

#blockObject (readonly)

Returns the value of attribute block.



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

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)


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

def block?
  !!@block
end