Skip to content

Commit

Permalink
made performValidation method public
Browse files Browse the repository at this point in the history
  • Loading branch information
bpisano committed May 21, 2024
1 parent 357ebc9 commit 6220fb7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Sources/StateKit/StateValidator/StateValidator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ public final class StateValidator<_State: State> {
performValidation()
}

func performValidation() {
currentState = getCurrentState()
}

private func observeValidators() {
validators.forEach { validator in
validator.shouldPerformValidation
Expand All @@ -36,9 +40,6 @@ public final class StateValidator<_State: State> {
}
}

private func performValidation() {
currentState = getCurrentState()
}

private func getCurrentState() -> _State {
var currentState: _State = initialState
Expand Down

0 comments on commit 6220fb7

Please sign in to comment.