Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename VaradicArgument to VariadicArgument #39

Merged
merged 4 commits into from
Nov 21, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Commander Changelog

- Renamed VaradicArgument to VariadicArgument.

## 0.5.0

### Enhancements
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ Hello Kyle
- Options - A option with a value which can be used multiple times, your command is passed an array containing all option values.
- Flag - A boolean, on/off flag.
- Argument - A positional argument.
- VaradicArgument - A varadic argument
- VariadicArgument - A variadic argument

**NOTE**: *It's important to describe your arguments after options and flags so the parser can differentiate between `--option value` and `--flag argument`.*

Expand Down
5 changes: 4 additions & 1 deletion Sources/ArgumentDescription.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ extension ArgumentConvertible {
}


open class VaradicArgument<T : ArgumentConvertible> : ArgumentDescriptor {
open class VariadicArgument<T : ArgumentConvertible> : ArgumentDescriptor {
public typealias ValueType = [T]

open let name: String
Expand All @@ -45,6 +45,9 @@ open class VaradicArgument<T : ArgumentConvertible> : ArgumentDescriptor {
}
}

@available(*, deprecated, message: "use VariadicArgument instead")
typealias VaradicArgument<T : ArgumentConvertible> = VariadicArgument<T>


open class Argument<T : ArgumentConvertible> : ArgumentDescriptor {
public typealias ValueType = T
Expand Down