-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ports - Kasey #36
base: master
Are you sure you want to change the base?
Ports - Kasey #36
Conversation
… computer might get stolen, wave 2 code done, test not done
HotelWhat We're Looking For
|
|
||
Minitest::Reporters.use! Minitest::Reporters::SpecReporter.new | ||
|
||
# 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like you got started with blocks
@block_room_status = block_room_status | ||
@discount = discount | ||
end | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Hotel
Congratulations! You're submitting your assignment!
Comprehension Questions