Module: Solargraph::Pin::Common

Included in:
Base
Defined in:
lib/solargraph/pin/common.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#closurePin::Base? (readonly)


7
8
9
# File 'lib/solargraph/pin/common.rb', line 7

def closure
  @closure
end

#locationObject (readonly)

Returns the value of attribute location


4
5
6
# File 'lib/solargraph/pin/common.rb', line 4

def location
  @location
end

Instance Method Details

#binderComplexType


34
35
36
# File 'lib/solargraph/pin/common.rb', line 34

def binder
  @binder || context
end

#commentsObject


38
39
40
# File 'lib/solargraph/pin/common.rb', line 38

def comments
  @comments ||= ''
end

#contextComplexType Also known as: full_context


23
24
25
26
# File 'lib/solargraph/pin/common.rb', line 23

def context
  # Get the static context from the nearest namespace
  @context ||= find_context
end

#kindObject


14
15
16
# File 'lib/solargraph/pin/common.rb', line 14

def kind
  @kind ||= Pin::KEYWORD
end

#nameString


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

def name
  @name ||= ''
end

#namespaceObject


29
30
31
# File 'lib/solargraph/pin/common.rb', line 29

def namespace
  context.namespace.to_s
end

#pathObject


42
43
44
# File 'lib/solargraph/pin/common.rb', line 42

def path
  @path ||= name.empty? ? context.namespace : "#{context.namespace}::#{name}"
end

#return_typeObject


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

def return_type
  @return_type ||= ComplexType::UNDEFINED
end