Last active
October 11, 2017 23:09
-
-
Save Sihui/b8a665bb7e3151216c0544491280c5ca to your computer and use it in GitHub Desktop.
Design Pattern: Command and Hotel Service
This file contains 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
class Concierge | |
attr_reader :request_list | |
def initialize | |
@request_list = [] | |
end | |
end | |
class We | |
def submit_request_to(concierge, request) | |
concierge.request_list << request | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment