Ad
  • Custom User Avatar

    In the solution, .reduce(:&) could be replaced with .all?.

  • Custom User Avatar

    From the instructions:

    Note that leading zeros (e.g. 01.02.03.04) are considered invalid.

    FWIW, in real life leading zeros are valid in an IP address (try pinging 127.000.000.001).

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Since this looks like a kata for beginners, I would recommend adding one or both of the following test cases, since programmers at this difficulty level probably aren't familiar with the test suite yet.

    Test.assert_equals Ball.new.ball_type, "regular"
    Test.assert_equals Ball.new("super").ball_type, "super"