Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rileymanda/ruby-enum
Ruby-enum is a Ruby project that demonstrates a custom implementation of certain methods from the Enumerable module.
https://github.com/rileymanda/ruby-enum
ruby ruby-enumerables
Last synced: about 7 hours ago
JSON representation
Ruby-enum is a Ruby project that demonstrates a custom implementation of certain methods from the Enumerable module.
- Host: GitHub
- URL: https://github.com/rileymanda/ruby-enum
- Owner: RileyManda
- License: mit
- Created: 2023-08-30T14:50:21.000Z (about 1 year ago)
- Default Branch: dev
- Last Pushed: 2023-09-02T07:36:18.000Z (about 1 year ago)
- Last Synced: 2023-09-03T09:25:04.706Z (about 1 year ago)
- Topics: ruby, ruby-enumerables
- Language: Ruby
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ruby-enum
Enumerable
# 📗 Table of Contents
- [📗 Table of Contents](#-table-of-contents)
- [📖 Enumerable](#-Enumerable)
- [🛠 Built With](#-built-with)
- [Tech Stack](#tech-stack)
- [Key Features](#key-features)
- [Getting Started](#getting-started)
- [👥 Author](#-author)
- [🔭 Future Features](#-future-features)
- [🤝 Contributing](#-contributing)
- [⭐️ Show your support](#️-show-your-support)
- [🙏 Acknowledgments](#-acknowledgments)
- [📝 License](#-license)**Enumerable** is a Ruby project that demonstrates a custom implementation of certain methods from the Enumerable module.
- Ruby
- Custom implementation of the `each` method for the `MyList` class.
- Custom implementations for `all?`, `any?`, and `filter` methods in the `MyEnumerable` module.## Getting Started
1. Create an instance of the `MyList` class.
2. Utilize the custom methods from the `MyEnumerable` module to work with the list.
3. Test your code using the provided examples.```ruby
require_relative 'my_list'# Create our list
list = MyList.new(1, 2, 3, 4)# Test #all?
puts list.all? { |e| e < 5 } # Should output: true
puts list.all? { |e| e > 5 } # Should output: false# Test #any?
puts list.any? { |e| e == 2 } # Should output: true
puts list.any? { |e| e == 5 } # Should output: false# Test #filter
puts list.filter(&:even?).inspect # Should output: [2, 4]
```👤 Clarence Atim
- GitHub: [@ClarenceAtim](https://github.com/ClarenceAtim)
👤 **RileyManda**
- GitHub: [@RileyManda](https://github.com/RileyManda)
- Twitter: [@rilecodez](https://twitter.com/rileycodez)
- LinkedIn: [rileymanda](https://www.linkedin.com/in/rileymanda/)- **Add additional custom methods for MyEnumerable**
Contributions, issues, and feature requests are welcome!
Feel free to check the [issues page](https://github.com/RileyManda/ruby-enum/issues).
If you like this project you can share this project to your friend
I would like to thank microverse for this project
This project is licensed under the [MIT License](./LICENSE).