Skip to content

Instantly share code, notes, and snippets.

@keithtom
Last active October 6, 2017 02:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save keithtom/2d9ae563bc948eedd60787b5cdea40f4 to your computer and use it in GitHub Desktop.
Save keithtom/2d9ae563bc948eedd60787b5cdea40f4 to your computer and use it in GitHub Desktop.
An example command for submitting an application. Raw
# 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