Skip to content

Instantly share code, notes, and snippets.

@Yoloabdo
Last active April 1, 2019 13:40
Show Gist options
  • Select an option

  • Save Yoloabdo/64f3d77e679476ceb02c5b1be784a17a to your computer and use it in GitHub Desktop.

Select an option

Save Yoloabdo/64f3d77e679476ceb02c5b1be784a17a to your computer and use it in GitHub Desktop.
struct LoginCommandsFactory {
private init() {}
static func getLoginCommand(id: String, password: String, completion: CallResponse<User>) -> Command {
let validatorCommand = LoginDetailsValidator(id, password)
let requestCommand = LoginRequestCommand(id, password: password, completion: completion)
let combined = CommandsCombiner(validatorCommand, requestCommand)
return combined
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment