Skip to content

Conversation

@jimmy-lyons
Copy link

@jimmy-lyons jimmy-lyons commented Apr 25, 2022

Your name

Jimmy Lyons

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?

lib/airport.rb Outdated
end

def check_for_storm
fail unless @current_weather != 'stormy'

Choose a reason for hiding this comment

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

What do you think about changing this to fail if @current_weather == 'stormy' ? It might be easy to read when this is raising the error

plane
end

def def_capacity(num)

Choose a reason for hiding this comment

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

This method might be redundant with the attr_accessor :capacity above

@@ -0,0 +1,38 @@
class Airport

Choose a reason for hiding this comment

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

I think methods explain quite clearly what are they doing. I don't have problems to understand how the code works

@@ -0,0 +1,71 @@
require 'airport'

Choose a reason for hiding this comment

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

Tests seem clear and test appropriate features

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.

2 participants