handle_messagemethod is one of the most fundamental controller methods in Xip. It enables you to succinctly handle messages without needing long
handle_messagemethod has four different "match arms". Each arm is just
key => valuepair since it's all just a hash. The keys are the
match expressions. The values are
procsthat serve as the action to take if the match expression is matched.
procis executed if the match expression is matched. That code has access to the same variables as the containing method's scope. So for example:
16. Similarly, if the user sends the message "Refinance", the value of