-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
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>
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.
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
andMyEnumerable
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 theMyList
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' |
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.
- 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 importMyEnumerable
since usingrequire_relative
for files in your directory instead ofrequire
is a ruby convention. 💯 - "
Require
should be used for external files, like gems, whilerequire_relative
should be used for referring to files within your directory."
list.rb
Outdated
def initialize(array) | ||
@list = array | ||
end |
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.
-
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 😉 -
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>
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.
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
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.
MyList
includes a module & contains two methodslist
each
implements looping throughlist
instanceMyEnumerable
contains methods for several array operationsall
checks if all elements oflist
array meets a comparisonany
checks if any element oflist
array meets a comparisonfilter
return a new array if any element oflist
array meets a conditionmin
returns the minimum value inlist
arraymax
returns the maximum value inlist
array