0001 // 0002 // LightweightCommand.swift 0003 // SwiftCLI 0004 // 0005 // Created by Jake Heiser on 7/25/14. 0006 // Copyright (c) 2014 jakeheis. All rights reserved. 0007 // 0008 0009 /// Can be instantiated and configured as a fully functional command rather 0010 /// than manually implementing CommandType. Should only be used for simple commands 0011 public class LightweightCommand: OptionCommandType { 0012 0013 public var commandName
ChainableCommand.swift:11 public class ChainableCommand: LightweightCommand {: String = "" 0014 public var commandSignature
LightweightCommand.swift:28 self.commandName = commandName: String = "" 0015 public var commandShortDescription
ChainableCommand.swift:18 commandSignature = signature: String = "" 0016 public var commandShortcut
ChainableCommand.swift:23 commandShortDescription = shortDescription: String? = nil 0017 0018 public var failOnUnrecognizedOptions
ChainableCommand.swift:28 commandShortcut = shortcut= true 0019 public var unrecognizedOptionsPrintingBehavior
ChainableCommand.swift:43 failOnUnrecognizedOptions = shouldFail: UnrecognizedOptionsPrintingBehavior = .PrintAll 0020 0021 public typealias ExecutionBlock
ChainableCommand.swift:38 unrecognizedOptionsPrintingBehavior = behavior= (arguments: CommandArguments) throws -> () 0022 public typealias OptionsSetupBlock
ChainableCommand.swift:47 public func withExecutionBlock(execution: ExecutionBlock) -> ChainableCommand {LightweightCommand.swift:24 public var executionBlock: ExecutionBlock? = nil= (options: Options) -> () 0023 0024 public var executionBlock
ChainableCommand.swift:32 public func withOptionsSetup(optionsSetup: OptionsSetupBlock) -> ChainableCommand {LightweightCommand.swift:25 public var optionsSetupBlock: OptionsSetupBlock? = nil: ExecutionBlock? = nil 0025 public var optionsSetupBlock
ChainableCommand.swift:48 executionBlock = executionLightweightCommand.swift:36 try executionBlock?(arguments: arguments): OptionsSetupBlock? = nil 0026 0027 public init
ChainableCommand.swift:33 optionsSetupBlock = optionsSetupLightweightCommand.swift:32 optionsSetupBlock?(options: options)(commandName: String) { 0028 self.commandName = commandName 0029 } 0030 0031 public func setupOptions(options: Options) { 0032 optionsSetupBlock?(options: options) 0033 } 0034 0035 public func execute(arguments: CommandArguments) throws { 0036 try executionBlock?(arguments: arguments) 0037 } 0038 0039 } 0040
ChainableCommand.swift:14 super.init(commandName: commandName)