Conversation
Design Scaffolding for the Hotel project
HotelWhat We're Looking ForTest Inspection
Code Review
Overall FeedbackVery far from complete but we've already talked about that. There are some indications of lack of understanding, but in areas we've also talked about since submitting this assignment. Definitely worth taking the time to redo this like we've talked about :) |
lib/service.rb
Outdated
|
|
||
|
|
||
| def room_cost(duration) | ||
| @cost = (duration - 1) * price |
There was a problem hiding this comment.
This is not useful as an instance variable here because it's specific to a specific room, not to the service instance.
lib/time.rb
Outdated
| @duration = duration | ||
| end | ||
|
|
||
| def reserve_time(date1, date2) |
There was a problem hiding this comment.
The code in this method seems to indicate a lack of understanding around instance variables.
Every line except the last one isn't updating the values.
lib/time.rb
Outdated
| attr_reader :check_in, :check_out, :duration | ||
|
|
||
| def initialize | ||
| @check_in = check_in |
There was a problem hiding this comment.
This doesn't make sense here because you aren't taking params in the initialize method.
lib/time.rb
Outdated
| require_relative '../lib/reservation' | ||
| require_relative '../lib/service' | ||
|
|
||
| class Dates |
There was a problem hiding this comment.
This whole class is pretty wonky. If it's not clear to you now what makes it wonky, I definitely wanna walk through that with you
…rb, updated reservation_test for cost
…tError-inception.
…attr_reader for nights
…s from date_range
…ervation_list (room assignment now meaningful)
… available rooms method
… in reserve_room method
Hotel
Congratulations! You're submitting your assignment!
Comprehension Questions