Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mesakduducoder/custom_enumerable_ruby
In this project we used Ruby class and module to create a custom enumerable
https://github.com/mesakduducoder/custom_enumerable_ruby
Last synced: 7 days ago
JSON representation
In this project we used Ruby class and module to create a custom enumerable
- Host: GitHub
- URL: https://github.com/mesakduducoder/custom_enumerable_ruby
- Owner: MesakDuduCoder
- License: mit
- Created: 2023-07-27T14:23:25.000Z (over 1 year ago)
- Default Branch: dev
- Last Pushed: 2023-08-25T13:42:39.000Z (over 1 year ago)
- Last Synced: 2024-04-15T10:28:31.795Z (10 months ago)
- Language: Ruby
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 📗 Table of Contents
- [📖 About the Project](#about-project)
- [🛠 Built With](#built-with)
- [Tech Stack](#tech-stack)
- [Key Features](#key-features)
- [💻 Getting Started](#getting-started)
- [Setup](#setup)
- [Prerequisites](#prerequisites)
- [Install](#install)
- [Usage](#usage)
- [👥 Authors](#authors)
- [🔭 Future Features](#future-features)
- [🤝 Contributing](#contributing)
- [⭐️ Show your support](#support)
- [🙏 Acknowledgements](#acknowledgements)
- [❓ FAQ](#faq)
- [📝 License](#license)**custom_enumerable_ruby** This project implements the following methods #all? #any? #filter as the ones in ruby Enumerables.
## Project Requirements
To successfully use the custom enumerables, we will get following results:
# Create our list
irb> list = MyList.new(1, 2, 3, 4)
=> ## Test #all?
irb> list.all? {|e| e < 5}
=> true
irb> list.all? {|e| e > 5}
=> false# Test #any?
irb> list.any? {|e| e == 2}
=> true
irb> list.any? {|e| e == 5}
=> false# Test #filter
irb> list.filter {|e| e.even?}
=> [2, 4]Ruby
Ruby
To get started, follow these steps:
### Prerequisites
Ensure you have the following installed:
- Ruby programming language
- IRB (Interactive Ruby)### Setup
1. Clone this repository to your local machine:
git clone https://github.com/MesakDuduCoder/custom_enumerable_ruby.git2. Open your terminal and navigate to the project directory:
cd custom_enumerable_ruby3. Run IRB to access the Ruby interactive console:
irb4. Load the Morse code decoder file in IRB
require_relative 'custom_enumerable_ruby'5. Now you can use the provided methods to decode Morse code messages. For example:
# Test #all?
irb> list.all? {|e| e < 5}
=> true
irb> list.all? {|e| e > 5}
=> false👤 **John Murianki**
- GitHub: [@githubhandle](https://github.com/tjay1760)
- Twitter: [@twitterhandle](https://twitter.com/TjayPod)
- LinkedIn: [LinkedIn](https://www.linkedin.com/in/john-murianki-thiongo)👤 **MesakDuduCoder**
- GitHub: [@githubhandle](https://github.com/MesakDuduCoder)
- Twitter: [@twitterhandle](https://twitter.com/mesak_10)
- LinkedIn: [LinkedIn](https://www.linkedin.com/in/mesak-lalrindika/)Contributions, issues, and feature requests are welcome!
Feel free to check the [issues page](https://github.com/MesakDuduCoder/custom_enumerable_ruby/issues).
If you like this project, please give it a star, and if you would love to tell me ways to improve it, contact me on LinkedIn or Twitter. It will be a pleasure to hear from you.
I would like to thank Microverse (microverse.org) for providing the resources and the knowledge to work on projects like this.
- **How do I install Ruby?**
You can download the latest version of Ruby from the official website: https://www.ruby-lang.org/en/downloads/
-**Where can I learn the basics of Ruby?**
Check out the Ruby documentation and tutorials at https://www.ruby-lang.org/en/documentation/ and https://www.ruby-lang.org/en/documentation/quickstart/
This project is [MIT](https://github.com/MesakDuduCoder/custom_enumerable_ruby/blob/enumarable/LICENSE) licensed.