Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Redefining Further - "Redefining the Service Layer with Groovy Categories"
class LocalPaymentService implements PaymentService {
public String process(PaymentType paymentType) {
if (paymentType instanceof CreditCardPaymentType) {
use (CreditCardPaymentProcessor) {
return paymentType.process()
}
}
// ...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.