class Solargraph::Pin::BaseMethod

def resolve_reference ref, api_map

Returns:
  • (ComplexType) -

Parameters:
  • api_map (ApiMap) --
  • ref (String) --
def resolve_reference ref, api_map
  parts = ref.split(/[\.#]/)
  if parts.first.empty? || parts.one?
    path = "#{namespace}#{ref}"
  else
    fqns = api_map.qualify(parts.first, namespace)
    return ComplexType::UNDEFINED if fqns.nil?
    path = fqns + ref[parts.first.length] + parts.last
  end
  pins = api_map.get_path_pins(path)
  pins.each do |pin|
    type = pin.typify(api_map)
    return type unless type.undefined?
  end
  nil
end