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)

Returns:



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

def closure
  @closure
end

#locationLocation (readonly)

Returns:



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

def location
  @location
end

Instance Method Details

#binderComplexType

Returns:



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

def binder
  @binder || context
end

#commentsString

Returns:

  • (String)


40
41
42
# File 'lib/solargraph/pin/common.rb', line 40

def comments
  @comments ||= ''
end

#contextComplexType Also known as: full_context

Returns:



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

#nameString

Returns:

  • (String)


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

def name
  @name ||= ''
end

#namespaceString

Returns:

  • (String)


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

def namespace
  context.namespace.to_s
end

#pathString

Returns:

  • (String)


45
46
47
# File 'lib/solargraph/pin/common.rb', line 45

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

#return_typeComplexType

Returns:



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

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