Continuing your work with the amusement park, you are tasked with writing some utility methods to facilitate checking if an attendee can use a ride.
Implement the Attendee#has_pass? method to return a boolean (true/false) value based on the presence of a ride pass.
Attendee.new(100).has_pass?
# => falseImplement the Attendee#fits_ride? method to see if an attendee fits a ride based on their height.
The ride's required minimum height is provided as an argument.
An attendee must have height greater than or equal to ride's required minimum height.
Attendee.new(140).fits_ride?(100)
# => trueImplement the Attendee#allowed_to_ride? method to see if an attendee is allowed to go on a ride. The ride's required minimum height is provided as an argument. An attendee must have a ride pass and be able to fit the ride.
attendee = Attendee.new(100)
attendee.issue_pass!(42)
attendee.allowed_to_ride?(120)
# => falseContinuing your work with the amusement park, you are tasked with writing some utility methods to facilitate checking if an attendee can use a ride.
Implement the Attendee#has_pass? method to return a boolean (true/false) value based on the presence of a ride pass.
Attendee.new(100).has_pass?
# => falseImplement the Attendee#fits_ride? method to see if an attendee fits a ride based on their height.
The ride's required minimum height is provided as an argument.
An attendee must have height greater than or equal to ride's required minimum height.
Attendee.new(140).fits_ride?(100)
# => trueImplement the Attendee#allowed_to_ride? method to see if an attendee is allowed to go on a ride. The ride's required minimum height is provided as an argument. An attendee must have a ride pass and be able to fit the ride.
attendee = Attendee.new(100)
attendee.issue_pass!(42)
attendee.allowed_to_ride?(120)
# => false