module Solargraph::Pin::Common

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