Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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

**Enumerable** is a Ruby project that demonstrates a custom implementation of certain methods from the Enumerable module.

## 🛠 Built With

### Tech Stack

- Ruby

### Key Features

- Custom implementation of the `each` method for the `MyList` class.
- Custom implementations for `all?`, `any?`, and `filter` methods in the `MyEnumerable` module.

(back to top)

## 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]
```

(back to top)

## 👥 Author

👤 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/)

(back to top)

## 🔭 Future Features

- **Add additional custom methods for MyEnumerable**

(back to top)

## 🤝 Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the [issues page](https://github.com/RileyManda/ruby-enum/issues).

(back to top)

## ⭐️ Show your support

If you like this project you can share this project to your friend

(back to top)

## 🙏 Acknowledgments

I would like to thank microverse for this project

(back to top)

## 📝 License

This project is licensed under the [MIT License](./LICENSE).

(back to top)