Last active
October 6, 2017 02:07
-
-
Save keithtom/2d9ae563bc948eedd60787b5cdea40f4 to your computer and use it in GitHub Desktop.
An example command for submitting an application. Raw
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
# A user submits their loan application | |
class SubmitApplication | |
def initialize(applicant, loan) | |
... | |
end | |
def execute | |
update_loan_workflow | |
charge_applicant_credit_card | |
check_applicant_fico_score | |
order_property_appraisal | |
send_receipt_to_applicant | |
notify_operations_team | |
end | |
private | |
def update_loan_workflow | |
# some magic happens here | |
end | |
... | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment