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

Implementation #1

Merged
merged 9 commits into from
Oct 14, 2023
Merged

Implementation #1

merged 9 commits into from
Oct 14, 2023

Conversation

mahammad-mostafa
Copy link
Owner

  • Class MyList includes a module & contains two methods
  • First method is to intialize the class with an array instance list
  • Second method each implements looping through list instance
  • Module MyEnumerable contains methods for several array operations
  • First method all checks if all elements of list array meets a comparison
  • Second method any checks if any element of list array meets a comparison
  • Third method filter return a new array if any element of list array meets a condition
  • Fourth method min returns the minimum value in list array
  • Fifth method max returns the maximum value in list array

mahammad-mostafa and others added 8 commits October 13, 2023 23:20
Co-Authored-By: Carlos  <c4r1oszambrano@gmail.com>
Co-Authored-By: Iheagwara Augustine <107426247+stino-x@users.noreply.github.com>
Co-Authored-By: Carlos  <c4r1oszambrano@gmail.com>
Co-Authored-By: Iheagwara Augustine <107426247+stino-x@users.noreply.github.com>
Co-Authored-By: Carlos  <c4r1oszambrano@gmail.com>
Co-Authored-By: Iheagwara Augustine <107426247+stino-x@users.noreply.github.com>
Co-Authored-By: Carlos  <c4r1oszambrano@gmail.com>
Co-Authored-By: Iheagwara Augustine <107426247+stino-x@users.noreply.github.com>
Co-Authored-By: Carlos  <c4r1oszambrano@gmail.com>
Co-Authored-By: Iheagwara Augustine <107426247+stino-x@users.noreply.github.com>
Co-Authored-By: Carlos  <c4r1oszambrano@gmail.com>
Co-Authored-By: Iheagwara Augustine <107426247+stino-x@users.noreply.github.com>
Co-Authored-By: Carlos  <c4r1oszambrano@gmail.com>
Co-Authored-By: Iheagwara Augustine <107426247+stino-x@users.noreply.github.com>
Co-Authored-By: Carlos  <c4r1oszambrano@gmail.com>
Co-Authored-By: Iheagwara Augustine <107426247+stino-x@users.noreply.github.com>
Copy link

@NahnahAJ NahnahAJ left a comment

Choose a reason for hiding this comment

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

Project Status: CHANGES REQUIRED ♻️

Hi @mahammad-mostafa, @stino-x and @CarlosZ96 ,

Good job so far!
There are some issues that you still need to work on to go to the next project but you are almost there!

Highlights 🔥

  • MyClass and MyEnumerable are saved in two separate files ✔️
  • The MyList class has an instance variable @list ✔️
  • The MyList class implements the #each method that yields all members of @list in succession ✔️
  • The MyEnumerable module is included in the MyList class ✔️
  • Has a MyEnumerable module that implements #all? #any? and #filter methods ✔️

Required Changes ♻️

Check the comments under the review.

Optional suggestions

Every comment with the [OPTIONAL] prefix is not crucial enough to stop the approval of this PR. However, I strongly recommend you take them into account as they can make your code better.

You can also consider:

  • N/A

Cheers, and Happy coding!👏👏👏

Feel free to leave any questions or comments in the PR thread if something is not 100% clear.
Please, remember to tag me in your question so I can receive the notification.

Please, do not open a new Pull Request for re-reviews. You should use the same Pull Request submitted for the first review, either valid or invalid unless it is requested otherwise.


As described in the Code reviews limits policy you have a limited number of reviews per project (check the exact number in your Dashboard). If you think that the code review was not fair, you can request a second opinion using this form.

list.rb Outdated
@@ -0,0 +1,16 @@
require './enumarable'

Choose a reason for hiding this comment

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

  • Great job so far @Team. There is just one change I will suggest you implement and you'll be on your way to the next Milestone 😉
  • Kindly ensure that you make use of require_relative to import MyEnumerable since using require_relative for files in your directory instead of require is a ruby convention. 💯
  • "Require should be used for external files, like gems, while require_relative should be used for referring to files within your directory."

list.rb Outdated
Comment on lines 5 to 7
def initialize(array)
@list = array
end

Choose a reason for hiding this comment

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

  • When trying to test your project, I noticed that the initialize method hasn't been properly setup to receive multiple arguments and as a result of that, it was causing an error in your project. So kindly fix that 😉

  • Error Message
    image

  • You can rewrite it like so 👍

    def initialize(*args)
        @list = []
        args.each { |arg| @list << arg }
    end

Co-Authored-By: Carlos  <c4r1oszambrano@gmail.com>
Co-Authored-By: Iheagwara Augustine <107426247+stino-x@users.noreply.github.com>
Copy link

@binhussen binhussen left a comment

Choose a reason for hiding this comment

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

Hi @mahammad-mostafa, @CarlosZ96 and @stino-x

Your project is complete! There is nothing else to say other than... it's time to merge it :shipit:
Congratulations! 🎉

Highlights

  • Added own enumerable ✔️
  • Well Structured Code✔️
  • Used Git flow ✔️

Optional suggestions

Every comment with the [OPTIONAL] prefix won't stop the approval of this PR. However, I strongly recommend you to take them into account as they can make your code better. Some of them were simply missed by the previous reviewer and addressing them will really improve your application.

Cheers and Happy coding!👏👏👏

Feel free to leave any questions or comments in the PR thread if something is not 100% clear.
Please, remember to tag me in your question so I can receive the notification.


As described in the Code reviews limits policy you have a limited number of reviews per project (check the exact number in your Dashboard). If you think that the code review was not fair, you can request a second opinion using this form.

@mahammad-mostafa mahammad-mostafa merged commit b2c3219 into development Oct 14, 2023
1 check passed
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