Skip to content

Instantly share code, notes, and snippets.

@Mitendra
Last active June 7, 2018 20:50
Show Gist options
  • Save Mitendra/aa42393a5b419a38e0cf23460a1afef9 to your computer and use it in GitHub Desktop.
Save Mitendra/aa42393a5b419a38e0cf23460a1afef9 to your computer and use it in GitHub Desktop.
implementation with intent
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