Skip to content
This repository was archived by the owner on Oct 28, 2021. It is now read-only.

Commit

Permalink
Refactor 'SKGenericDocInfo' designated initializer's access level to …
Browse files Browse the repository at this point in the history
…public
  • Loading branch information
chriszielinski committed Jan 31, 2019
1 parent 8b4e771 commit 67e94f2
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions Source/Requests/Doc Info/SKGenericDocInfo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,20 @@ open class SKGenericDocInfo<Entity: SKBaseEntity>: NSObject, Codable {
/// - Note: This key is only present if a diagnostic was emitted
public let diagnostics: [SKDiagnostic]?

// MARK: - Private Initializers
// MARK: - Public Initializers

private init(file: File?, moduleName: String?, compilerArguments: [String]) throws {
/// Creates a new synchronous _SourceKit_ doc info request.
///
/// - Warning: The request is sent synchronously, so ensure this initializer is not called on the main thread.
///
/// - Note: Ensure this initializer is only called with either a `file` or a `moduleName`, **not both**.
///
/// - Parameters:
/// - file: The source file to gather documentation for.
/// - moduleName: The module name to gather documentation for.
/// - compilerArguments: The compiler arguments used to build the module (e.g `["-sdk", "/path/to/sdk"]`).
/// - Throws: A `SKError`, if an error occurs.
public init(file: File?, moduleName: String?, compilerArguments: [String]) throws {
let sharedInterface = SylvesterInterface.shared
let response: SKGenericDocInfo<Entity> = try sharedInterface.docInfo(file: file,
moduleName: moduleName,
Expand All @@ -53,8 +64,6 @@ open class SKGenericDocInfo<Entity: SKBaseEntity>: NSObject, Codable {
resolve(from: file?.path)
}

// MARK: - Public Initializers

/// Creates a new synchronous _SourceKit_ doc info request.
///
/// - Warning: The request is sent synchronously, so ensure this initializer is not called on the main thread.
Expand Down

0 comments on commit 67e94f2

Please sign in to comment.