Skip to content

Commit

Permalink
public isEmpty in Call
Browse files Browse the repository at this point in the history
  • Loading branch information
Lancelotbronner committed Mar 17, 2020
1 parent 57f2a42 commit 04b858d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Sources/TerminalCommands/Call/Call.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ extension Command {
//MARK: Computed Properties

/// Wether the call has ran out of arguments
var isAtEnd: Bool { args.isEmpty }
public var isEmpty: Bool { args.isEmpty }

//MARK: Initialization

Expand All @@ -23,12 +23,12 @@ extension Command {

/// Makes sure there are no arguments left in the call
public func assertEmpty() throws {
guard isAtEnd else { throw Errors.expectedNoArguments }
guard isEmpty else { throw Errors.expectedNoArguments }
}

/// Makes sure there are arguments left in the call
public func assertNotEmpty() throws {
guard !isAtEnd else { throw Errors.expectedArgument }
guard !isEmpty else { throw Errors.expectedArgument }
}

/// Makes sure there are exactly `n` arguments left in the call
Expand Down

0 comments on commit 04b858d

Please sign in to comment.