https://github.com/ebeagusamuel/advanced_building_blocks_enumerables
This is a project that implements my own version of Ruby's enumerable methods.
https://github.com/ebeagusamuel/advanced_building_blocks_enumerables
Last synced: 2 months ago
JSON representation
This is a project that implements my own version of Ruby's enumerable methods.
- Host: GitHub
- URL: https://github.com/ebeagusamuel/advanced_building_blocks_enumerables
- Owner: ebeagusamuel
- License: mit
- Created: 2020-05-09T11:40:56.000Z (about 5 years ago)
- Default Branch: development
- Last Pushed: 2020-05-15T07:29:40.000Z (about 5 years ago)
- Last Synced: 2025-02-07T20:51:15.417Z (4 months ago)
- Language: Ruby
- Size: 13.7 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Ruby Enumerable Methods
This is my custom implemtation of some Ruby's enumerable methods.## Getting Started
To get a local copy up and running follow these simple example steps.
- Clone or download this repository to your local workstation.
### Prerequisites
Since all the code is written using ruby `Ruby Runtime >= 1.9` is required to interpret the code. if you don't have ruby runtime installed on your computer
follow the instruction for your specific operating system on the [official installation guide](https://www.ruby-lang.org/en/documentation/installation/)### Usage
After you have downloaded and have a local copy on your computer, open the folder using your terminal/commandline window and run
`my_enumerables.rb`
## Contents
1. **#my_each method**
Implementation of [`#each`](https://ruby-doc.org/core-2.7.1/Enumerable.html#method-i-each_with_index)
2. **#my_each_with_index method**
Implementation of [`#each_with_index`](https://ruby-doc.org/core-2.7.1/Enumerable.html#method-i-each_with_index)
3. **#my_select (#my_find_all, #my_filter) method**
Implementation of [`#select, find_all, filter`](https://ruby-doc.org/core-2.7.1/Enumerable.html#method-i-select)
4. **#my_all? method**
Implementation of [`#all?`](https://ruby-doc.org/core-2.7.1/Enumerable.html#method-i-all-3F)
5. **#my_any? method**
Implementation of [`#any?`](https://ruby-doc.org/core-2.7.1/Enumerable.html#method-i-any-3F)
6. **#my_none? method**
Implementation of [`#none?`](https://ruby-doc.org/core-2.7.1/Enumerable.html#method-i-none-3F)
7. **#my_count method**
Implementation of [`#count`](https://ruby-doc.org/core-2.7.1/Enumerable.html#method-i-count)
8. **#my_map method**
Customize Implementation of [`#map`](https://ruby-doc.org/core-2.7.1/Enumerable.html#method-i-map). this method will now take `Proc` as an argument unlike the original one. if both `Proc` and `block` is given `Proc` will have precedence
9. **#my_inject (#my_reduce) method**
Implementation of [`#inject, (#reduce)`](https://ruby-doc.org/core-2.7.1/Enumerable.html#method-i-inject)
10. **#multiply_els method**
New method only created for testing `my_inject` method## Author
👤 **Ebeagu Samuel**
- Github: [@ebeagusamuel](https://github.com/ebeagusamuel)
- Twitter: [@ebeagu_samuel](https://twitter.com/ebeagu_samuel)
- Linkedin: [linkedin](https://www.linkedin.com/in/samuel-ebeagu-7b4617110/)## 🤝 Contributing
Contributions, issues and feature requests are welcome!
Feel free to check the [issues page](issues/).
## Show your support
Give a ⭐️ if you like this project!
## 📝 License
This project is [MIT](lic.url) licensed.