-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Airport #2499
base: main
Are you sure you want to change the base?
Airport #2499
Conversation
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 was able to run the code with ease and clearly understood how it works.
def instruct_land(plane) | ||
@dock = {} | ||
key = plane | ||
dock[key] = "grounded" |
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.
Have you thought about assigning the "grounded" string as an instance variable within the Plane class because it might make it easier to check and change the status of the plane (e.g. flying or grounded).
require_relative 'plane' | ||
|
||
class Airport | ||
attr_accessor :hangar, :dock |
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.
Have you thought about removing :dock as an attr_accessor so it cannot be checked by the user?
@hangar = [] | ||
end | ||
|
||
def instruct_land(plane) |
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.
Clearly describes the code procedure within this method
Your name
Please write your full name here to make it easier to find your pull request.
User stories
Please list which user stories you've implemented (delete the ones that don't apply).
README checklist
Does your README contains instructions for
Here is a pill that can help you write a great README!