class Concierge
attr_reader :request_list
def initialize
@request_list = []
end
def act_on_requests
@request_list.each(&:execute)
end
end
class HotelService
attr_reader :data
def initialize(data)
@data = data
end
##
# @abstract
def execute
raise NotImplementedError
end
end
class RoomService < HotelService
attr_reader :kitchen
def initialize(data)
super(data)
@kitchen = Kitchen.new
end
def execute
kitchen.cook_for(data)
end
end
class LaundryService < HotelService
attr_reader :cleaning_dpt
def initialize(data)
super(data)
@cleaning_dpt = CleaningDepartment.new
end
def execute
cleaning_dpt.do_laundry_for(data)
end
end
class TripPlanningService < HotelService
attr_reader :tripAdvisor
def initialize(data)
super(data)
@tripAdvisor = TripAdvisor.new
end
def execute
tripAdvisor.plan_for(data)
end
end