Last active
December 17, 2015 21:09
-
-
Save danveloper/5672589 to your computer and use it in GitHub Desktop.
Bettering - "Redefining the Service Layer with Groovy Categories"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CheckPaymentProcessor { | |
static String process(PaymentType paymentType) { | |
def gateway = new CheckPaymentProcessor() | |
// … implementation code ... | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class EmployeePaymentProcessor { | |
static String process(PaymentType paymentType) { | |
def gateway = new EmployeePaymentGateway() | |
// … implementation code ... | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class GiftCardPaymentProcessor { | |
static String process(PaymentType paymentType) { | |
def gateway = new GiftCardPaymentGateway() | |
// … implementation code ... | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment