Last active
October 11, 2017 23:10
-
-
Save Sihui/6a921ad01a7a2424f92cbafb686ae0c0 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 | |
def act_on_requests | |
@request_list.each do |request| | |
request.execute | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment