Open
Conversation
… computer might get stolen, wave 2 code done, test not done
HotelWhat We're Looking For
|
CheezItMan
reviewed
Mar 25, 2019
| # Require_relative your lib files here! | ||
| require_relative "../lib/Reservation" | ||
| require_relative "../lib/Hotel" | ||
| require_relative "../lib/Rooms" |
There was a problem hiding this comment.
the Rooms file doesn't exist`.
Also typically in Ruby we don't capitalize file names. Just a style thingy.
| booked_rooms = [] | ||
| dates.each do |date| | ||
| reservation_by_date(date).each do |res| | ||
| booked_rooms << res.room |
There was a problem hiding this comment.
This works, but you'll end up with a lot of duplicate rooms in booked_rooms, just a little inefficient.
| end | ||
| end | ||
|
|
||
| def create_hotel_block(check_in:, check_out:, block_size:, block_name:, block_discount: nil) |
There was a problem hiding this comment.
Looks like you got started with blocks
| @block_room_status = block_room_status | ||
| @discount = discount | ||
| end | ||
|
|
There was a problem hiding this comment.
Suggestion: detecting if a reservation overlaps with a date sounds like something that reservation should be able to answer, instead of your Hotel class.
| @@ -0,0 +1 @@ | |||
| I'd like to get wave 3 working. Especially clean up reservations and play with an idea I have about having a reservations class, and also a block class. | |||
There was a problem hiding this comment.
You've started on this, but more detail is needed.
| end.must_raise ArgumentError | ||
| end | ||
|
|
||
| it "lets you book a reservation on the same day as a checkout" do |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hotel
Congratulations! You're submitting your assignment!
Comprehension Questions