-
Notifications
You must be signed in to change notification settings - Fork 45
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
Shaunna Wiens --carets #36
base: master
Are you sure you want to change the base?
Conversation
…om by room number
…block one at a time
…s and constraints
…and get available rooms from a block
… that it isn't included in rake
HotelWhat We're Looking For
|
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.
Nicely done, just a few in-code comments.
lib/hotel.rb
Outdated
def get_available_rooms(date_begin, date_end) | ||
available_rooms = @rooms.clone | ||
|
||
@reservations.each do |res| |
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 type of loop looks repeated, maybe you could turn that into a helper method.
# raise StandardError.new "this room doesn't exist" | ||
# end | ||
|
||
def assign_id |
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.
I'm not sure what purpose this method serves, why make the block Ids random?
end | ||
end | ||
|
||
it "creates 20 hotels that can identify their room numbers" 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.
This is probably too specific as to the implementation of the rooms, like that they are in order. Maybe just test that rooms
must include a room with each id.
Hotel
Congratulations! You're submitting your assignment!
Comprehension Questions