Skip to content
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

Baljit's branch for airport_challenge #2495

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

baljitrakhra
Copy link

Baljit Singh Rakhra

User stories

Please list which user stories you've implemented (delete the ones that don't apply).

  • User story 1: "I want to instruct a plane to land at an airport"
  • User story 2: "I want to instruct a plane to take off from an airport and confirm that it is no longer in the airport"
  • User story 3: "I want to prevent landing when the airport is full"
  • User story 4: "I would like a default airport capacity that can be overridden as appropriate"
  • User story 5: "I want to prevent takeoff when weather is stormy"
  • User story 6: "I want to prevent landing when weather is stormy"

README checklist

Does your README contains instructions for

  • how to install,
  • how to run,
  • and how to test your code?

Here is a pill that can help you write a great README!


describe '# landing' do

it 'has a Default capcity' do
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small typo, capacity

spec/airport_spec.rb Show resolved Hide resolved
lib/airport.rb Outdated
Comment on lines 22 to 27
def takeoff(plane)
fail 'Due to stormy weather no landing allowed' if stormy?
fail 'Plane is not at the airport' if plane.in_flight?
@planes.delete(plane)
'plane has taken off'
end
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

takeoff method should change plane's in_flight variable to true

lib/airport.rb Outdated
Comment on lines 1 to 2
require 'weather'
require 'plane'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

consider using require_relative

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do that and resubmit the pull request

@baljitrakhra
Copy link
Author

as per @mcsuGH comments, I have updated require to require_relative in all the files and added updating planes in_flight status takeoff module

Copy link

@R552-beep R552-beep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall written well & easy to read through.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants