-
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
Ampers - Sara S - Hotel #32
base: master
Are you sure you want to change the base?
Conversation
… so that it'd be uniform for rake
…or start and end dates
….rb for added clarity
… classes and tests as a result
…rooms and views a list of rooms that aren't reserved for a given range
…d access_reservation method to remove strftime(%Y-%m-%d) functionality
…lib/hotel_admin.rb
…om method in hotel class.rb
def add_reservation(reservation) | ||
#note: this is tightly coupled, I think. | ||
@reservations << reservation | ||
@reservation = reservation |
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.
Why set this as an instance variable here?
end | ||
|
||
def calc_reservations(reservation) | ||
reservation.price_night * reservation.calc_duration |
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 think this logic would be better inside the reservation object
|
||
def create_block(input) | ||
|
||
if input[:block_start_date] == nil || input[:block_end_date] == 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.
All of this data validation should be in an initialize
somewhere
HotelWhat We're Looking For
|
Hotel
Congratulations! You're submitting your assignment!
Comprehension Questions