Skip to content

Commit

Permalink
Project: Custom Enumerables: Added link to Additional resources list (#…
Browse files Browse the repository at this point in the history
…28277)

* Update project_custom_enumerables.md

Added a link to an article that I found very helpful in getting me started on the project.

* Update project_custom_enumerables.md

Address linting issues raised in #28277

- Insert additional blank line below headings 'Introduction' and 'Assignment.
- Insert blank line above html tag.
- Amend ordered list to always use 1. as prefix.
- Improve link text description to avoid use of 'this'.
  • Loading branch information
MidlifeMechanicus authored Jun 27, 2024
1 parent c911b64 commit fa72412
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ruby/advanced_ruby/project_custom_enumerables.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
### Introduction

You should be very familiar with the Enumerable module that gets mixed into the Array and Hash classes (among others) and provides you with lots of handy iterator methods. To prove that there's no magic to it, you're going to rebuild those methods.

We will explain an example of how an enumerable works to give you an idea of how to start tackling these methods. Specifically we're going to break down the `#find` enumerable method. The `#find` method finds the first element that matches the given block's condition and returns it. If one isn't found, it returns `nil`.
Expand Down Expand Up @@ -37,16 +38,17 @@ With `self.each`, we're calling the `#each` method on the object instance that's
If the block returns `true`/truthy for an element, we immediately `return` that element. If nothing is found, we'll iterate all the way through the array and end up executing the `nil` return at the very end. Pretty cool, huh? Now it's time for you to practice:

### Assignment

<div class="lesson-content__panel" markdown="1">

1. Fork and clone our [custom enumerables repo](https://github.com/TheOdinProject/custom_enumerable_project)
2. Follow the [instructions in the README](https://github.com/TheOdinProject/custom_enumerable_project#installation) to get the repo setup locally
3. Rebuild each of [the methods in this table](https://github.com/TheOdinProject/custom_enumerable_project#methods) and make sure they all pass the tests associated with them.
1. Follow the [instructions in the README](https://github.com/TheOdinProject/custom_enumerable_project#installation) to get the repo setup locally
1. Rebuild each of [the methods in the table at the end of the README](https://github.com/TheOdinProject/custom_enumerable_project#methods) and make sure they all pass the tests associated with them.

</div>

### Additional resources

This section contains helpful links to related content. It isn't required, so consider it supplemental.

- It looks like this lesson doesn't have any additional resources yet. Help us expand this section by contributing to our curriculum.
- Jason Mattingly has a useful article on [Writing Your Own Enumerables in Ruby](https://jsonmattingly.medium.com/writing-your-own-enumerables-in-ruby-18db4fa0e5fe).

0 comments on commit fa72412

Please sign in to comment.