Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ian-ellis/c08f3cffa04d57b8d6442affcd626e1b to your computer and use it in GitHub Desktop.
Save ian-ellis/c08f3cffa04d57b8d6442affcd626e1b to your computer and use it in GitHub Desktop.
package com.theiconic.spockexamples.bag.domain.usecases;
import com.theiconic.spockexamples.common.domain.usecases.ObservableUseCase;
import com.theiconic.spockexamples.bag.domain.repositories.BagRepository;
import javax.inject.Inject;
import rx.Observable;
public class RemoveProductFromBagUseCase implements ObservableUseCase<String, Boolean> {
@Inject
protected BagRepository repository;
@Inject
public RemoveProductFromBagUseCase() {
}
@Override
public Observable<Boolean> execute(final String simpleSku) {
return repository.removeItem(simpleSku);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment