module Solargraph::Pin::Common

def binder

Returns:
  • (ComplexType) -
def binder
  @binder || context
end

def comments

Returns:
  • (String) -
def comments
  @comments ||= ''
end

def context

Returns:
  • (ComplexType) -
def context
  # Get the static context from the nearest namespace

  @context ||= find_context
end

def find_context

Returns:
  • (ComplexType) -
def find_context
  here = closure
  until here.nil?
    if here.is_a?(Pin::Namespace)
      return here.return_type
    elsif here.is_a?(Pin::Method)
      return here.context
    end
    here = here.closure
  end
  ComplexType::ROOT
end

def name

Returns:
  • (String) -
def name
  @name ||= ''
end

def namespace

Returns:
  • (String) -
def namespace
  context.namespace.to_s
end

def path

Returns:
  • (String) -
def path
  @path ||= name.empty? ? context.namespace : "#{context.namespace}::#{name}"
end

def return_type

Returns:
  • (ComplexType) -
def return_type
  @return_type ||= ComplexType::UNDEFINED
end