Skip to content

Commit

Permalink
Added implementation for help property in Configuration class
Browse files Browse the repository at this point in the history
  • Loading branch information
calebkleveter committed Nov 5, 2017
1 parent 1f4708c commit 9561c70
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Sources/Ether/Configuration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ public class Configuration: Command {
])
]

public let help: [String] = [
"Configure custom actions to occure when a command is run",
"Run `config help` to get information on expected data for the command options"
]

public let console: ConsoleProtocol

public init(console: ConsoleProtocol) {
Expand All @@ -55,7 +60,7 @@ public class Configuration: Command {
do {
val = try value("value", from: arguments)
} catch {
if key == "help" { self.help() }
if key == "help" { printHelp() }
return
}

Expand All @@ -75,7 +80,7 @@ public class Configuration: Command {
setBar.finish()
}

fileprivate func help() {
fileprivate func printHelp() {
let help = """
Below are the keys, values, and expected types for the configuration JSON.
Expand Down

0 comments on commit 9561c70

Please sign in to comment.