Module: Solargraph::Pin::Common

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#closurePin::Closure? (readonly)

Returns:



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

def closure
  @closure
end

#contextComplexType Also known as: full_context

Returns:



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

def context
  # Get the static context from the nearest namespace

  @context ||= find_context
end

#locationLocation (readonly)

Returns:



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

def location
  @location
end

Instance Method Details

#binderComplexType

Returns:



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

def binder
  @binder || context
end

#commentsString

Returns:

  • (String)


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

def comments
  @comments ||= ''
end

#nameString

Returns:

  • (String)


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

def name
  @name ||= ''
end

#namespaceString

Returns:

  • (String)


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

def namespace
  context.namespace.to_s
end

#pathString

Returns:

  • (String)


50
51
52
# File 'lib/solargraph/pin/common.rb', line 50

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

#return_typeComplexType

Returns:



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

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