class YARD::Serializers::FileSystemSerializer

def serialized_path(object)

Returns:
  • (String) - if object is a String, returns

Parameters:
  • object (CodeObjects::Base, CodeObjects::ExtraFileObject, String) --
def serialized_path(object)
  return object if object.is_a?(String)
  if object.is_a?(CodeObjects::ExtraFileObject)
    fspath = ['file.' + object.name + (extension.empty? ? '' : ".#{extension}")]
  else
    objname = object != YARD::Registry.root ? mapped_name(object) : "top-level-namespace"
    objname += '_' + object.scope.to_s[0, 1] if object.is_a?(CodeObjects::MethodObject)
    fspath = [objname + (extension.empty? ? '' : ".#{extension}")]
    if object.namespace && object.namespace.path != ""
      fspath.unshift(*object.namespace.path.split(CodeObjects::NSEP))
    end
  end
  File.join(encode_path_components(*fspath))
end