Last active
June 7, 2018 20:50
-
-
Save Mitendra/aa42393a5b419a38e0cf23460a1afef9 to your computer and use it in GitHub Desktop.
implementation with intent
This file contains hidden or 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
| def sendEmail(checkoutDetails) | |
| if isCheckoutCompleted(checkoutDetails) | |
| # send an email saying checkout is complete | |
| else | |
| # send an email saying checkout errored out | |
| end | |
| end | |
| def isCheckoutCompleted(checkoutDetails) | |
| if(checkoutDetails.length == 1) # same as no of rows | |
| return true | |
| else | |
| return false | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment