Skip to content

Instantly share code, notes, and snippets.

@Sihui
Last active October 11, 2017 23:10
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 Sihui/6a921ad01a7a2424f92cbafb686ae0c0 to your computer and use it in GitHub Desktop.
Save Sihui/6a921ad01a7a2424f92cbafb686ae0c0 to your computer and use it in GitHub Desktop.
Design Pattern: Command and Hotel Service
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