Executable
public protocol Executable
The Executable
-
Execute the command
Throws
If execution failsDeclaration
Swift
@discardableResult func execute(_ command: String) throws -> StringParameters
commandThe command that should be executed
Return Value
The corresponding output
-
Print text
Declaration
Swift
func print(_ text: String)Parameters
textThe text that should be printed out
-
Print error
Declaration
Swift
func printError(_ text: String)Parameters
textThe text that should be printed out
-
Start loading
Declaration
Swift
func startLoading(message: String?)Parameters
messageThe optional message
-
Stop loading
Declaration
Swift
func stopLoading(message: String?)Parameters
messageThe optional message
-
Read line
Declaration
Swift
func readLine(prompt: String?) -> String?Parameters
promptThe optional prompt text
Return Value
The retrieved line if available
-
Terminate Executable
Declaration
Swift
func terminate()
-
startLoading()Extension methodStart loading
Declaration
Swift
func startLoading() -
stopLoading()Extension methodStop loading
Declaration
Swift
func stopLoading()
View on GitHub
Executable Protocol Reference