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
ChainableCommand.swift:11
public class ChainableCommand: LightweightCommand {
: OptionCommandType { 0012 0013 public var commandName
LightweightCommand.swift:28
        self.commandName = commandName
: String = "" 0014 public var commandSignature
ChainableCommand.swift:18
        commandSignature = signature
: String = "" 0015 public var commandShortDescription
ChainableCommand.swift:23
        commandShortDescription = shortDescription
: String = "" 0016 public var commandShortcut
ChainableCommand.swift:28
        commandShortcut = shortcut
: String? = nil 0017 0018 public var failOnUnrecognizedOptions
ChainableCommand.swift:43
        failOnUnrecognizedOptions = shouldFail
= true 0019 public var unrecognizedOptionsPrintingBehavior
ChainableCommand.swift:38
        unrecognizedOptionsPrintingBehavior = behavior
: UnrecognizedOptionsPrintingBehavior = .PrintAll 0020 0021 public typealias ExecutionBlock
ChainableCommand.swift:47
    public func withExecutionBlock(execution: ExecutionBlock) -> ChainableCommand {
LightweightCommand.swift:24
    public var executionBlock: ExecutionBlock? = nil
= (arguments: CommandArguments) throws -> () 0022 public typealias OptionsSetupBlock
ChainableCommand.swift:32
    public func withOptionsSetup(optionsSetup: OptionsSetupBlock) -> ChainableCommand {
LightweightCommand.swift:25
    public var optionsSetupBlock: OptionsSetupBlock? = nil
= (options: Options) -> () 0023 0024 public var executionBlock
ChainableCommand.swift:48
        executionBlock = execution
LightweightCommand.swift:36
        try executionBlock?(arguments: arguments)
: ExecutionBlock? = nil 0025 public var optionsSetupBlock
ChainableCommand.swift:33
        optionsSetupBlock = optionsSetup
LightweightCommand.swift:32
        optionsSetupBlock?(options: options)
: OptionsSetupBlock? = nil 0026 0027 public init
ChainableCommand.swift:14
        super.init(commandName: commandName)
(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